[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wierd Process
From: |
Brendan Strejcek |
Subject: |
Re: Wierd Process |
Date: |
Tue, 26 Jul 2005 16:40:26 -0500 |
User-agent: |
Mutt/1.5.6+20040818i |
You could do the cleanconfig definition in shellcommands:
copy:
any::
/some/file
define=apprestart
shellcommands:
apprestart::
"/scripts/config_test.pl"
define=cleanconfig
processes:
configclean::
"appa" restart "/usr/bin/appa"
Since there are three levels of dependency here, you will need to make
sure that your actionsequence is in the correct order, as the second
pass will not be enough to ensure that everything happens (I think).
Brian E. Seppanen wrote:
> I have to perform the following functions:
>
> 1 copy a file if it is new. if I copy define a restart flag. If a
> restart flag is defined I have to trigger a class that will call
> cleanconfig = ( ReturnsZero = (/scripts/config_test.pl) )
>
> I'll try to pseudo code what i have.
>
> classes:
> apprestart::
> configclean = ( ReturnsZero(/scripts/config_test.pl) )
>
> copy:
> any::
> /etc/appa/config dest=/etc/appa/config server=appa.domain.com
> trustkey=true encrypt=true define=apprestart
>
>
>
> processes:
> configclean::
> "appa" restart "/usr/bin/env
> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
> /etc/init.d/appa restart"
>
>
> The one thing I'm concerned about is if apprestart is evaluated as null
> because the copy action hasn't been invoked yet.
>
> Does anyone have any suggestions on methodology for making this work.
> There's probably a better way to do this.
>
> Thanks for the time.
>
>
>
>
>
> Brian Seppanen
> 608.826.1464
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>
- Wierd Process, Brian E. Seppanen, 2005/07/26
- Re: Wierd Process,
Brendan Strejcek <=