Ad Widget

Collapse

Check daemon status via systemctl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Florius
    Junior Member
    • Jan 2017
    • 15

    #1

    Check daemon status via systemctl

    Hi,

    I have CSF running, and this won't work with proc.num, as it doesn't have a process running.
    So I'd like to check via systemctl.
    I already have a script which gives this output:
    Code:
       Active: active (exited) since Fri 2018-09-21 17:01:14 CEST; 3 weeks 6 days ago
    Is it possible to do something that if it's anything else but 'active (exited)' it triggers?
    Thank you!
  • ewestdal
    Junior Member
    • Jul 2016
    • 8

    #2
    Florius,

    I would use a system run to either run the script or execute the command directly. If you build the return of 1 or 0 into your script then you can alert based off numeric values instead. Essentially make you script check for the Active to be there or not.

    Comment

    Working...