Changes between Version 2 and Version 3 of InitdScriptForDebian
- Timestamp:
- Jul 28, 2009, 7:51:49 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InitdScriptForDebian
v2 v3 33 33 # Joost Cassee 34 34 # <joost@cassee.net> 35 # Sebastian Rahlf 36 # <basti AT redtoad.de> 35 37 # 36 # Version: @(#)fastcgi 0. 3 05-Aug-2008 joost AT cassee.net38 # Version: @(#)fastcgi 0.4 28-Jul-2009 basti AT redtoad.de 37 39 # 38 40 … … 72 74 chown -R $RUN_AS:$RUN_AS $RUNFILES_PATH 73 75 76 # A specific site can be started/stopped by appending its name 77 SITE=$2 78 if [ -n "$SITE" ]; then 79 DJANGO_SITES=$SITE 80 fi 81 74 82 # 75 83 # Function that starts the daemon/service. … … 81 89 for SITE in $DJANGO_SITES 82 90 do 83 echo -n " ,$SITE"91 echo -n " $SITE" 84 92 if [ -f $RUNFILES_PATH/$SITE.pid ]; then 85 93 echo -n " already running" … … 105 113 for SITE in $DJANGO_SITES 106 114 do 107 echo -n " ,$SITE"115 echo -n " $SITE" 108 116 start-stop-daemon --stop --quiet --pidfile $RUNFILES_PATH/$SITE.pid \ 109 117 || echo -n " not running" … … 118 126 case "$ACTION" in 119 127 start) 120 echo -n "Starting $DESC: $NAME"128 echo -n "Starting $DESC:" 121 129 d_start 122 130 echo "." … … 124 132 125 133 stop) 126 echo -n "Stopping $DESC: $NAME"134 echo -n "Stopping $DESC:" 127 135 d_stop 128 136 echo "." 137 ;; 138 139 status) 140 echo "Status of $DESC:" 141 for SITE in $DJANGO_SITES 142 do 143 echo -n " $SITE" 144 if [ -f $RUNFILES_PATH/$SITE.pid ]; then 145 echo " running ($(cat $RUNFILES_PATH/$SITE.pid))" 146 else 147 echo " not running" 148 fi 149 done 129 150 ;; 130 151 … … 138 159 139 160 *) 140 echo "Usage: $NAME {start|stop|restart|force-reload }" >&2161 echo "Usage: $NAME {start|stop|restart|force-reload|status} [site]" >&2 141 162 exit 3 142 163 ;;