Browse Source

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 15 năm trước cách đây
mục cha
commit
788b1b6548
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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