Forum: Cfengine Help
Subject: Re: Restarting service after changing the config
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,18659,18660#msg-18660
You need to define the class when the promise is repaired (i.e. if the file was
modified). For example:
"/etc/ssh/sshd_config"
copy_from => secure_cp("/srv/common/etc/ssh/sshd_config","fileserver.cpp"),
perms => mog("600","root","root"),
classes => if_repaired("sshd_restart_needed");
if_repaired is defined in cfengine_stdlib.cf:
body classes if_repaired(x)
{
promise_repaired => { "$(x)" };
}
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine