Explorar o código

When running as an unprivileged user, celeryd may not be able to delete it's pid and lockfile on shutdown itself. Let the init script take care of it.

Michael Elsdorfer %!s(int64=15) %!d(string=hai) anos
pai
achega
788b1b6548
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      contrib/debian/init.d/celeryd

+ 5 - 1
contrib/debian/init.d/celeryd

@@ -91,7 +91,11 @@ case "$1" in
     ;;
   stop)
     log_daemon_msg "Stopping celery task worker server" "celeryd"
-    if start-stop-daemon --stop --quiet --oknodo --pidfile $CELERYD_PID_FILE; then log_end_msg 0
+    if start-stop-daemon --stop --quiet --pidfile $CELERYD_PID_FILE; 
+    then
+        rm -f $CELERYD_PID_FILE
+        rm -f ${CELERYD_PID_FILE}.lock
+        log_end_msg 0
     else
         log_end_msg 1
     fi