|
Lines 127-132
Link Here
|
| 127 |
|
127 |
|
| 128 |
# Read config |
128 |
# Read config |
| 129 |
. $LIGHTTPD_CONFIG |
129 |
. $LIGHTTPD_CONFIG |
|
|
130 |
# FIXME read that from $CONFIG_FILE, FIXME read that from $LIGHTTPD_CONFIG |
| 131 |
PID_FILE=/var/run/lighttpd.pid |
| 130 |
|
132 |
|
| 131 |
# Source LSB init functions |
133 |
# Source LSB init functions |
| 132 |
# providing start_daemon, killproc, pidofproc, |
134 |
# providing start_daemon, killproc, pidofproc, |
|
Lines 175-181
Link Here
|
| 175 |
## Start daemon with startproc(8). If this fails |
177 |
## Start daemon with startproc(8). If this fails |
| 176 |
## the return value is set appropriately by startproc. |
178 |
## the return value is set appropriately by startproc. |
| 177 |
umask ${LIGHTTPD_UMASK:-077} |
179 |
umask ${LIGHTTPD_UMASK:-077} |
| 178 |
startproc -e $LIGHTTPD_BIN $LIGHTTPD_PARAMS |
180 |
startproc -p $PID_FILE -e $LIGHTTPD_BIN $LIGHTTPD_PARAMS |
| 179 |
|
181 |
|
| 180 |
# Remember status and be verbose |
182 |
# Remember status and be verbose |
| 181 |
rc_status -v |
183 |
rc_status -v |
|
Lines 185-191
Link Here
|
| 185 |
## Stop daemon with killproc(8) and if this fails |
187 |
## Stop daemon with killproc(8) and if this fails |
| 186 |
## killproc sets the return value according to LSB. |
188 |
## killproc sets the return value according to LSB. |
| 187 |
|
189 |
|
| 188 |
killproc -TERM $LIGHTTPD_BIN |
190 |
killproc -TERM -p $PID_FILE $LIGHTTPD_BIN |
| 189 |
|
191 |
|
| 190 |
# Remember status and be verbose |
192 |
# Remember status and be verbose |
| 191 |
rc_status -v |
193 |
rc_status -v |
|
Lines 222-228
Link Here
|
| 222 |
|
224 |
|
| 223 |
echo -n "Reload service lighttpd " |
225 |
echo -n "Reload service lighttpd " |
| 224 |
## if it supports it: |
226 |
## if it supports it: |
| 225 |
killproc -HUP $LIGHTTPD_BIN |
227 |
killproc -HUP -p $PID_FILE $LIGHTTPD_BIN |
| 226 |
#touch /var/run/lighttpd.pid |
228 |
#touch /var/run/lighttpd.pid |
| 227 |
rc_status -v |
229 |
rc_status -v |
| 228 |
|
230 |
|
|
Lines 236-242
Link Here
|
| 236 |
|
238 |
|
| 237 |
# If it supports signaling: |
239 |
# If it supports signaling: |
| 238 |
echo -n "Reload service lighttpd " |
240 |
echo -n "Reload service lighttpd " |
| 239 |
killproc -HUP $LIGHTTPD_BIN |
241 |
killproc -HUP -p $PID_FILE $LIGHTTPD_BIN |
| 240 |
#touch /var/run/lighttpd.pid |
242 |
#touch /var/run/lighttpd.pid |
| 241 |
rc_status -v |
243 |
rc_status -v |
| 242 |
|
244 |
|
|
Lines 258-264
Link Here
|
| 258 |
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) |
260 |
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) |
| 259 |
|
261 |
|
| 260 |
# NOTE: checkproc returns LSB compliant status values. |
262 |
# NOTE: checkproc returns LSB compliant status values. |
| 261 |
checkproc $LIGHTTPD_BIN |
263 |
checkproc -k -p $PID_FILE $LIGHTTPD_BIN |
| 262 |
# NOTE: rc_status knows that we called this init script with |
264 |
# NOTE: rc_status knows that we called this init script with |
| 263 |
# "status" option and adapts its messages accordingly. |
265 |
# "status" option and adapts its messages accordingly. |
| 264 |
rc_status -v |
266 |
rc_status -v |
|
Lines 268-274
Link Here
|
| 268 |
## argument to this init script which is required for a reload. |
270 |
## argument to this init script which is required for a reload. |
| 269 |
## Note: probe is not (yet) part of LSB (as of 1.9) |
271 |
## Note: probe is not (yet) part of LSB (as of 1.9) |
| 270 |
|
272 |
|
| 271 |
test /etc/lighttpd/lighttpd.conf -nt /var/run/lighttpd.pid && echo reload |
273 |
test /etc/lighttpd/lighttpd.conf -nt $PID_FILE && echo reload |
| 272 |
;; |
274 |
;; |
| 273 |
*) |
275 |
*) |
| 274 |
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" |
276 |
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" |