diff options
author | Steve Kemp <steve@steve.org.uk> | 2013-07-09 15:34:49 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2013-07-09 15:34:49 +0100 |
commit | acfea433944c68d6b3af7f807c5b8d0ff9a74d41 (patch) | |
tree | c75ab9100bc45847c66bf0665ce9444305e201b1 /debian/postinst | |
parent | 214ac29cf799d73ce918330ec9c005fccc48d81d (diff) |
Don't restart services unless they exist
Diffstat (limited to 'debian/postinst')
-rwxr-xr-x | debian/postinst | 10 |
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 |