Jelajahi Sumber

Attempting to resolve issue-1387 by first declaring local pid_file= to null in check_status()

Found that if _get_pid_files returns more than one file the local pid_files=`_get_pid_files` line 161 results in a bad variable name on ubuntu 12.04.
monkut 11 tahun lalu
induk
melakukan
0ac059d2da
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      extra/generic-init.d/celeryd

+ 3 - 2
extra/generic-init.d/celeryd

@@ -158,8 +158,9 @@ restart_workers () {
 }
 
 check_status () {
-    local pid_files=`_get_pid_files`
-    [ -z "$pid_files" ] && echo "celeryd is stopped" && exit 1
+    local pid_files=
+    pid_files=`_get_pid_files`
+    [ -z "$pid_files" ] && echo "celeryd not running (no pidfile)" && exit 1
 
     local one_failed=
     for pid_file in $pid_files; do