      if [ ! -s "$logfile" ] ; then
          echo "(This file should be empty unless there's a catastrophic failure.)" >> "$logfile"
      fi
-@@ -54,24 +55,21 @@
+@@ -54,26 +55,24 @@
         -c "$exec --daemon --pid-file '$pidfile' --dsn '@$config'" \
  	>> "$logfile" 2>&1 &
      retval=$?

 case "$1" in
     start)
         $1
@@ -89,11 +85,11 @@
     stop)
         $1
         ;;

         echo "User has insufficient privilege."
         exit 4
     fi
+    log_daemon_msg "Stopping pScheduler $prog" "pscheduler-$prog"
     echo -n $"Stopping pScheduler $prog: "
-        if [ -s "$pidfile" ]; then
-	    kill $(cat $pidfile) || failure "Stopping pScheduler $prog"
-	    sleep 3
-	    kill -9 $(cat $pidfile) 2> /dev/null || :
-	    rm -f $pidfile
-	fi
+    if [ -s "$pidfile" ]; then
+        kill $(cat $pidfile) || failure "Stopping pScheduler $prog"
+        sleep 3
+        kill -9 $(cat $pidfile) 2> /dev/null || :
+        rm -f $pidfile
+    fi
     retval=$?
