|
From: | Marco van Beek |
Subject: | Re: Restart on if something changed? |
Date: | Thu, 26 Jan 2006 16:40:24 +0000 |
User-agent: | Thunderbird 1.5 (Windows/20051201) |
Hi Paul,Use a copy command that copies this specific file, and then use define to add the box to a "restart_ssh" class, that you use later with in a shellcommand.
From the manual: defineThis option is followed by a list of classes which are to be `switched on' if and only if the named file was copied. In multiple (recursive) copy operations the classes become defined if any of the files in the file tree were copied. This feature is useful for switching on other actions which are to be performed after the installation of key files (e.g. package installation scripts etc).
Regards, Marco PAUL WILLIAMSON wrote:
How can I tell a process to restart only if a certain file has changed? We just changed the way our login banners are supposed to occur.Before, they appeared prior to login, so I could just use the sshd_config file and specify an banner in the file. Now, I need to present the banner after login. In order to do this, I need to restart sshd. But, I don't want to restart sshd during the middle of the day or when the sshd_config file hasn't changed.Paul _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine
[Prev in Thread] | Current Thread | [Next in Thread] |