summaryrefslogtreecommitdiff
path: root/files/post-update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'files/post-update.sh')
-rw-r--r--files/post-update.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/files/post-update.sh b/files/post-update.sh
new file mode 100644
index 0000000..21030b1
--- /dev/null
+++ b/files/post-update.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+# See https://we.riseup.net/riseup+tech/puppet
+
+echo ""
+echo "Updating puppet configuration..."
+echo ""
+
+unset GIT_DIR
+
+cd $PUPPET_DIR
+
+# lockfile comes from procmail package
+lockfile ~/puppet.lock
+
+# call external SUID script that will update PUPPET_DIR
+sudo -u puppet /usr/local/sbin/update-puppet-conf.sh \
+ || echo "Updating puppet failed. Fix it manually."
+
+# remove lock
+rm -f ~/puppet.lock