mirror of
https://github.com/manios/docker-nagios.git
synced 2026-01-23 02:14:07 +00:00
Remove the pid files outside and before the runit scripts (#8,#13)
This commit is contained in:
parent
5c5ad86c13
commit
47ecd6f422
3 changed files with 12 additions and 10 deletions
|
|
@ -1,11 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
echo -n "Removing Apache HTTPD PID file before starting it ..."
|
||||
(rm -f /var/run/apache2/httpd.pid || true)
|
||||
echo "OK"
|
||||
|
||||
. /usr/sbin/envvars
|
||||
|
||||
# TODO Check about cache
|
||||
|
|
|
|||
|
|
@ -2,8 +2,4 @@
|
|||
|
||||
set -eu
|
||||
|
||||
echo -n "Removing rsyslogd PID file before starting it ..."
|
||||
(rm -f /var/run/rsyslogd.pid || true)
|
||||
echo "OK"
|
||||
|
||||
exec rsyslogd -n -f /etc/rsyslog.conf
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
# adapted from https://github.com/discourse/discourse_docker/blob/master/image/base/boot
|
||||
# this script becomes PID 1 inside the container, catches termination signals, and stops
|
||||
# processes managed by runit
|
||||
|
|
@ -19,6 +21,16 @@ if [ ! -f "${NAGIOS_HOME}/etc/htpasswd.users" ] ; then
|
|||
chown -R ${NAGIOS_USER}.${NAGIOS_GROUP} "${NAGIOS_HOME}/etc/htpasswd.users"
|
||||
fi
|
||||
|
||||
# Remove pid files
|
||||
|
||||
echo -n "Removing Apache HTTPD PID file before starting it ..."
|
||||
(rm -f /var/run/apache2/httpd.pid || true)
|
||||
echo "OK"
|
||||
|
||||
echo -n "Removing rsyslogd PID file before starting it ..."
|
||||
(rm -f /var/run/rsyslogd.pid || true)
|
||||
echo "OK"
|
||||
|
||||
shutdown() {
|
||||
echo Shutting Down
|
||||
ls /etc/service | SHELL=/bin/sh parallel --no-notice sv force-stop {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue