diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2017-01-24 18:40:28 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2017-01-31 14:40:05 -0500 |
commit | 0ae6bab4a97f12a0c93200df36ac1741696eeed5 (patch) | |
tree | 5f38d9b1fce3d7f942adcbd5e02b3e50fc84d17a /doc | |
parent | b63c9011c392a3cb0a2e8df82301e5b6002905c9 (diff) | |
download | lighttpd-git-0ae6bab4a97f12a0c93200df36ac1741696eeed5.tar.gz |
[doc] SIGUSR1 doc and lighttpd-angel SIGUSR1
lighttpd-angel:
add paranoid check to avoid sending kill(-1, <signal>) as root
Diffstat (limited to 'doc')
-rw-r--r-- | doc/initscripts.txt | 13 | ||||
-rw-r--r-- | doc/lighttpd-angel.8 | 7 | ||||
-rw-r--r-- | doc/systemd/lighttpd.service | 2 |
3 files changed, 18 insertions, 4 deletions
diff --git a/doc/initscripts.txt b/doc/initscripts.txt index 44ea53fc..e6104fa3 100644 --- a/doc/initscripts.txt +++ b/doc/initscripts.txt @@ -1,9 +1,12 @@ * lighttpd responds to the following signals: -SIGINT - shut down gracefully (finish serving existing connections and exit) -SIGTERM - shut down immediately (terminate existing connections and exit) +SIGTERM - shut down immediately (terminate existing connections, then exit) +SIGINT - shut down gracefully (serve existing connections, then exit) +SIGUSR1 - reload gracefully (serve existing connections, then reload config) SIGHUP - re-open log files (NOTE: does not reload lighttpd configuration) +(Note: SIGUSR1 behavior is available in lighttpd 1.4.46 and later) + * lighttpd graceful restart @@ -11,6 +14,10 @@ https://blog.lighttpd.net/articles/2005/09/02/graceful-restart/ The current recommended way to reload lighttpd config is to gracefully stop and then to restart lighttpd. +With lighttpd 1.4.46 and later, SIGUSR1 is the recommended method to gracefully +handle configuration reloads and log rotation, though a graceful stop and then +restart of lighttpd is still required for lighttpd configurations which chroot. + * lighttpd initscripts @@ -36,5 +43,7 @@ https://gitweb.gentoo.org/repo/gentoo.git/tree/www-servers/lighttpd/files openSUSE: https://build.opensuse.org/package/show/server:http/lighttpd +sample systemd unit script: doc/systemd/lighttpd.service + Additional, updated information may be found at https://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource diff --git a/doc/lighttpd-angel.8 b/doc/lighttpd-angel.8 index ccf394d5..dd61b7cb 100644 --- a/doc/lighttpd-angel.8 +++ b/doc/lighttpd-angel.8 @@ -11,15 +11,18 @@ lighttpd-angel \- monitor/supervise lighttpd daemon lighttpd-angel will restart lighttpd if lighttpd exits for any reason, other than by signals sent by lighttpd-angel. .PP +Send lighttpd-angel SIGTERM to initiate immediate shutdown of lighttpd. +.PP Send lighttpd-angel SIGINT to initiate graceful shutdown of lighttpd. .PP -Send lighttpd-angel SIGTERM to initiate shutdown of lighttpd. +Send lighttpd-angel SIGHUP to initiate graceful restart of lighttpd. .PP -Send lighttpd-angel SIGHUP to initiate restart of lighttpd, reloading config. +Send lighttpd-angel SIGUSR1 to initiate graceful reload of lighttpd config. . .SH SEE ALSO Online Documentation: +https://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource https://blog.lighttpd.net/articles/2007/09/02/there-is-an-angel-for-lighty/ . .SH AUTHOR diff --git a/doc/systemd/lighttpd.service b/doc/systemd/lighttpd.service index e92b160c..6dfe44f5 100644 --- a/doc/systemd/lighttpd.service +++ b/doc/systemd/lighttpd.service @@ -4,8 +4,10 @@ After=network.target [Service] Type=simple +PIDFile=/var/run/lighttpd.pid ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf +ExecReload=/bin/kill -USR1 $MAINPID Restart=on-failure [Install] |