help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Restart on if something changed?


From: Jason Martin
Subject: Re: Restart on if something changed?
Date: Thu, 26 Jan 2006 12:08:06 -0500
User-agent: Mutt/1.5.11

On Thu, Jan 26, 2006 at 09:28:13AM -0500, PAUL WILLIAMSON wrote:
> How can I tell a process to restart only if a certain file has changed?
Assuming that the banner is put in place by CFE, have the copy
statement 'define' a class when it updates the file. Then, put a
entry in processes that kills / restarts SSHD if that class is
true, and another stanza that is based on that class being false
that just verifies sshd is running.

copy:

any::
/some/file
dest=/other/file
define=restart_sshd

processes:

restart_sshd::
"sshd" signal=kill restart "/etc/init.d/sshd start"

!restart_sshd::
"sshd" restart "/etc/init.d/sshd start"


Or something along those lines.

-Jason Martin
-- 
"Apple" (c) 6024 b.c., Adam & Eve
This message is PGP/MIME signed.

Attachment: pgpBNkY_qovsq.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]