Procházet zdrojové kódy

initscripts: Die if the provided celeryd/celerybeat is not executable. Closes #76

Ask Solem před 15 roky
rodič
revize
1cba6d685c
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9 0
      contrib/debian/init.d/celeryd

+ 9 - 0
contrib/debian/init.d/celeryd

@@ -87,6 +87,15 @@ if [ ! -z "$VIRTUALENV" ]; then
 fi
 
 
+if [ -f "$CELERYD" && ! -x "$CELERYD" ]; then
+    echo "ERROR: $CELERYD is not executable."
+    echo "Please make it executable by doing: chmod +x '$CELERYD'"
+
+    echo "celeryd is disabled"
+    exit
+fi
+
+
 case "$1" in
   start)
     check_dev_null