Forum: Cfengine Help
Subject: Re: verify service running
Author: demostat
Link to topic: https://cfengine.com/forum/read.php?3,19200,19208#msg-19208
Hi,
My two cents, an example for debian...
if listed service-s (ssh, ntp, etc) are not running, start them
vars:
debian::
"service" slist => { "ssh", "ntp", "nrpe" };
"daemon_path" string => "/etc/init.d" ;
processes:
debian::
"/usr/sbin/$(service)"
comment => "Check processes",
restart_class => "restart_$(service)";
commands:
"${daemon_path}/${service} start"
comment => "Starting service ",
ifvarclass => canonify("restart_$(service)");
/Eduard
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine