Fix logrotate script. debian-release-0.2
authorFilippos Giannakos <philipgian@grnet.gr>
Mon, 8 Apr 2013 11:04:22 +0000 (14:04 +0300)
committerFilippos Giannakos <philipgian@grnet.gr>
Mon, 8 Apr 2013 11:04:22 +0000 (14:04 +0300)
In case a log rotation is performed, but no pid file exists, continue
gracefully.

debian/archipelago.logrotate

index b496eee..114de3f 100644 (file)
@@ -7,7 +7,7 @@
        notifempty
        create 664 root root
        postrotate
-               kill -USR1 $(cat /var/run/archipelago/blockerb.pid)
+               kill -USR1 `cat /var/run/archipelago/blockerb.pid` 2>/dev/null || true
        endscript
 }
 
@@ -20,7 +20,7 @@
        notifempty
        create 664 root root
        postrotate
-               kill -USR1 $(cat /var/run/archipelago/blockerm.pid)
+               kill -USR1 `cat /var/run/archipelago/blockerm.pid` 2>/dev/null || true
        endscript
 }
 
@@ -33,7 +33,7 @@
        notifempty
        create 664 root root
        postrotate
-               kill -USR1 $(cat /var/run/archipelago/mapperd.pid)
+               kill -USR1 `cat /var/run/archipelago/mapperd.pid` 2>/dev/null || true
        endscript
 }
 
@@ -46,6 +46,6 @@
        notifempty
        create 664 root root
        postrotate
-               kill -USR1 $(cat /var/run/archipelago/vlmcd.pid)
+               kill -USR1 `cat /var/run/archipelago/vlmcd.pid` 2>/dev/null || true
        endscript
 }