فهرست منبع

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

Ask Solem 15 سال پیش
والد
کامیت
1cba6d685c
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  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