瀏覽代碼

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 年之前
父節點
當前提交
0ac059d2da
共有 1 個文件被更改,包括 3 次插入2 次删除
  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