]> git.sven.stormbind.net Git - sven/mpt-status.git/commitdiff
Add some blanks line into the init script output.
authorSven Hoexter <sven@timegate.de>
Mon, 17 Oct 2011 12:52:42 +0000 (14:52 +0200)
committerSven Hoexter <sven@timegate.de>
Mon, 17 Oct 2011 12:52:42 +0000 (14:52 +0200)
mpt-status.init

index 7e72bb0b5acc17aeb380253923c60a9a5454413d..c30c4ac08623c9dd9e43c2bac5434616e47f9452 100644 (file)
@@ -142,7 +142,9 @@ d_start() {
     elif check_daemon ; then
        # Use daemonize to turn it into a daemon and start it with daemon().
         daemon --pidfile $PIDFILE /usr/sbin/daemonize $SCRIPTNAME check_mpt
-       return 0
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && rm -f $PIDFILE
+       return $RETVAL
     else
         log_warning_msg "Daemon is already running. Refusing to start another"
         return 0
@@ -154,8 +156,10 @@ d_start() {
 #
 d_stop() {
         if [ -f $PIDFILE ] ; then
-               killproc -p $PIDFILE $SCRIPTNAME > /dev/null 2>&1 
-               rm -f $PIDFILE
+               killproc $SCRIPTNAME
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && rm -f $PIDFILE
+               return $RETVAL
         else
                 log_warning_msg "Daemon is already stopped."
                 return 0
@@ -175,21 +179,24 @@ d_stop_by_restart() {
 
 case "$1" in
   start)
-        echo -n $"Starting $DESC: $NAME"
+        echo $"Starting $DESC: $NAME"
         d_start
+       echo
         ;;
   stop)
-        echo -n $"Stopping $DESC: $NAME"
+        echo $"Stopping $DESC: $NAME"
         d_stop
+       echo
         ;;
   check_mpt)
         check_mpt
         ;;
   restart|force-reload)
-        echo -n "Restarting $DESC: $NAME"
+        echo "Restarting $DESC: $NAME"
         d_stop_by_restart
         sleep 1
         d_start
+       echo
         ;;
   *)
         echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2