summaryrefslogtreecommitdiff
path: root/share/hydractl/puppet-enable
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-19 12:59:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-19 12:59:58 -0300
commite40b3514e041a4bb2aac962b639c947333365b4b (patch)
tree7439d05c58ead1e440e0375b87135e32f4b4a50a /share/hydractl/puppet-enable
parent427e9fc7722459041fbef65ef5e0fd00c43ea110 (diff)
downloadhydra-e40b3514e041a4bb2aac962b639c947333365b4b.tar.gz
hydra-e40b3514e041a4bb2aac962b639c947333365b4b.tar.bz2
Additional checks at puppet-enable and system-upgrade
Diffstat (limited to 'share/hydractl/puppet-enable')
-rwxr-xr-xshare/hydractl/puppet-enable12
1 files changed, 8 insertions, 4 deletions
diff --git a/share/hydractl/puppet-enable b/share/hydractl/puppet-enable
index b29603c..bdb4455 100755
--- a/share/hydractl/puppet-enable
+++ b/share/hydractl/puppet-enable
@@ -35,9 +35,13 @@ fi
# Business
if [ "$BASENAME" == "puppet-enable" ]; then
- $sudo sed -i -e 's/START=no/START=yes/' /etc/default/puppet
- $sudo service puppet start
+ if [ -e "/etc/default/puppet" ]; then
+ $sudo sed -i -e 's/START=no/START=yes/' /etc/default/puppet
+ $sudo service puppet start
+ fi
else
- $sudo sed -i -e 's/START=yes/START=no/' /etc/default/puppet
- $sudo service puppet stop
+ if [ -e "/etc/default/puppet" ]; then
+ $sudo sed -i -e 's/START=yes/START=no/' /etc/default/puppet
+ $sudo service puppet stop
+ fi
fi