On Fri, Sep 18, 2009 at 4:46 AM, David Schmitt <da...@dasz.at> wrote:
> > John Ingersoll wrote: > > Hi, > > > > I have an exec {} that runs a command line script, for which 0 and 1 are > > both good return codes. (Specifically, spamassassin update; 1 means no > > new downloads). I tried > > > > returns => [0,1], > > I'm using this for sa-update, in an exec: > > > /usr/bin/sa-update ; case $? in 0) /etc/init.d/spamassassin restart;; 1) > : ;; *) echo Unknown Error; exit 1;; esac > Very good; I had overlooked the simple bash syntax that can handle that . And I had forgotten about doing the restart when updates happen. Fortunately it's a test box with not much happening yet. Thanks, -- John Ingersoll, Jr. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---