summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2013-07-09 15:34:49 +0100
committerSteve Kemp <steve@steve.org.uk>2013-07-09 15:34:49 +0100
commita946c4d29a20940b2078e83b9e65c057c1bccce7 (patch)
tree924b4f33fe34bc26172a88d4399b327cd0b6bc5f /debian/postinst
parent9f9ecbc9b2906824e06b48d09b9758c8152b1588 (diff)
Don't restart services unless they exist
Diffstat (limited to 'debian/postinst')
-rwxr-xr-xdebian/postinst10
1 files changed, 5 insertions, 5 deletions
diff --git a/debian/postinst b/debian/postinst
index 6310acf..b181533 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -26,12 +26,12 @@ custodian-queue --flush || true
#
# 2. If we have agents then restart them
#
-if [ -d /etc/service ]; then
- echo "Restarting services"
- for i in /etc/service/custodian-agent*; do
+for i in /etc/service/custodian-agent*; do
+ if [ -d $i ] ; then
+ echo "Restarting service: $i"
sv restart $i
- done
-fi
+ fi
+done
#DEBHELPER#
exit 0