Fix the init script so mcollective can be restarted properly
[packages/trusty/mcollective.git] / debian / mcollective.init
index 6b02d0b06572066b6aefa05a5db090168190e5ca..ee8d68f757a37913cdf522cb36bb4d252b65041b 100755 (executable)
@@ -46,8 +46,8 @@ case "$1" in
     start)
         echo "Starting daemon: " $name
         # start the program
-       if [ -f $pidfile ]; then
-               if [ -f $(cat /proc/$(cat $pidfile)/exe > /dev/null) ] ; then
+       if [ -f "$pidfile" ]; then
+               if [ -L "/proc/$(cat $pidfile)/exe" ] ; then
                        echo MCollective appears to be running
                        exit 1
                else