diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2023-10-20 09:30:25 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-23 10:49:19 +0100 |
commit | 0d3c7e9630c975b78ddccc2a2fd0c61fde98a552 (patch) | |
tree | c8cdf6fda9492ec4af85f684aae30f3d6460a263 | |
parent | 74fe34f1c099256a71d175a563ee2b3ec7c0f722 (diff) | |
download | poky-0d3c7e9630c975b78ddccc2a2fd0c61fde98a552.tar.gz |
lighttpd: update init script
- add configtest option
- add configtest before starting, restart, reload, force-reload
- change reload,force-reload to use lighttpd graceful restart
via kill signal USR1
(From OE-Core rev: 589450af505de6a00ba7d7a3b647a514d1d1282f)
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 |