diff options
Diffstat (limited to 'meta/recipes-extended/lighttpd/lighttpd/lighttpd')
-rw-r--r-- | meta/recipes-extended/lighttpd/lighttpd/lighttpd | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd index 82fbaa523b..f369dce42c 100644 --- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd +++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd | |||
@@ -6,9 +6,14 @@ NAME=lighttpd | |||
6 | DESC="Lighttpd Web Server" | 6 | DESC="Lighttpd Web Server" |
7 | OPTS="-f /etc/lighttpd/lighttpd.conf" | 7 | OPTS="-f /etc/lighttpd/lighttpd.conf" |
8 | 8 | ||
9 | configtest() { | ||
10 | "$DAEMON" $OPTS -tt || exit 1 | ||
11 | } | ||
12 | |||
9 | case "$1" in | 13 | case "$1" in |
10 | start) | 14 | start) |
11 | echo -n "Starting $DESC: " | 15 | echo -n "Starting $DESC: " |
16 | configtest | ||
12 | start-stop-daemon --start -x "$DAEMON" -- $OPTS | 17 | start-stop-daemon --start -x "$DAEMON" -- $OPTS |
13 | echo "$NAME." | 18 | echo "$NAME." |
14 | ;; | 19 | ;; |
@@ -17,16 +22,26 @@ case "$1" in | |||
17 | start-stop-daemon --stop -x "$DAEMON" | 22 | start-stop-daemon --stop -x "$DAEMON" |
18 | echo "$NAME." | 23 | echo "$NAME." |
19 | ;; | 24 | ;; |
20 | restart|force-reload) | 25 | restart) |
21 | echo -n "Restarting $DESC: " | 26 | echo -n "Restarting $DESC: " |
27 | configtest | ||
22 | start-stop-daemon --stop -x "$DAEMON" | 28 | start-stop-daemon --stop -x "$DAEMON" |
23 | sleep 1 | 29 | sleep 1 |
24 | start-stop-daemon --start -x "$DAEMON" -- $OPTS | 30 | start-stop-daemon --start -x "$DAEMON" -- $OPTS |
25 | echo "$NAME." | 31 | echo "$NAME." |
26 | ;; | 32 | ;; |
33 | reload|force-reload) | ||
34 | echo -n "Reloading $DESC: " | ||
35 | configtest | ||
36 | killall -USR1 "${DAEMON##*/}" | ||
37 | echo "$NAME." | ||
38 | ;; | ||
39 | configtest) | ||
40 | configtest | ||
41 | ;; | ||
27 | *) | 42 | *) |
28 | N=/etc/init.d/$NAME | 43 | N=/etc/init.d/$NAME |
29 | echo "Usage: $N {start|stop|restart|force-reload}" >&2 | 44 | echo "Usage: $N {start|stop|restart|reload|force-reload|configtest}" >&2 |
30 | exit 1 | 45 | exit 1 |
31 | ;; | 46 | ;; |
32 | esac | 47 | esac |