Browse Source

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 years ago
parent
commit
b12387caf5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      extra/generic-init.d/celeryd

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

@@ -168,7 +168,8 @@ restart_workers () {
 }
 
 check_status () {
-    local pid_files=`_get_pid_files`
+    local pid_files=
+    pid_files=`_get_pid_files`
     [ -z "$pid_files" ] && echo "celeryd not running (no pidfile)" && exit 1
 
     local one_failed=