Browse Source

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

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