Created
April 15, 2011 15:36
-
-
Save jlgreer/921894 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle agent chkconfig_on(foo) { | |
classes: | |
"service_is_enabled" expression => returnszero("/usr/bin/chkconfig --level 3 $(foo)"); | |
commands: | |
!service_is_enabled:: | |
"/sbin/chkconfig $(foo) on"; | |
} | |
bundle agent chkconfig_off(foo) { | |
classes: | |
"service_is_enabled" expression => returnszero("/usr/bin/chkconfig --level 3 $(foo)"); | |
commands: | |
service_is_enabled:: | |
"/sbin/chkconfig $(foo) off"; | |
} | |
bundle agent chkconfig_add(foo) { | |
classes: | |
"service_is_in_chkconfig" expression => returnszero("/usr/bin/chkconfig --list $(foo)"); | |
commands: | |
!service_is_in_chkconfig:: | |
"/sbin/chkconfig --add $(foo)"; | |
} | |
bundle agent chkconfig_del(foo) { | |
classes: | |
"service_is_in_chkconfig" expression => returnszero("/usr/bin/chkconfig --list $(foo)"); | |
commands: | |
service_is_in_chkconfig:: | |
"/sbin/chkconfig --del $(foo)"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment