mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Fix the race when monit is used to monitor services which are also
started at boot time via init.d at boot time.
This commit is contained in:
parent
9b67435cf3
commit
79a2a4f18d
@ -40,6 +40,13 @@ DAEMON_USER=root
|
|||||||
#
|
#
|
||||||
do_start()
|
do_start()
|
||||||
{
|
{
|
||||||
|
# Avoid a potential race at boot time when both monit and init.d start
|
||||||
|
# the same service
|
||||||
|
PIDS=$(pidof $DAEMON)
|
||||||
|
for PID in ${PIDS}; do
|
||||||
|
kill -9 $PID
|
||||||
|
done
|
||||||
|
|
||||||
# Raise the file descriptor limit - we expect to open a lot of sockets!
|
# Raise the file descriptor limit - we expect to open a lot of sockets!
|
||||||
ulimit -n 65536
|
ulimit -n 65536
|
||||||
|
|
||||||
|
@ -39,6 +39,13 @@ DAEMON_USER=root
|
|||||||
#
|
#
|
||||||
do_start()
|
do_start()
|
||||||
{
|
{
|
||||||
|
# Avoid a potential race at boot time when both monit and init.d start
|
||||||
|
# the same service
|
||||||
|
PIDS=$(pidof $DAEMON)
|
||||||
|
for PID in ${PIDS}; do
|
||||||
|
kill -9 $PID
|
||||||
|
done
|
||||||
|
|
||||||
# Return
|
# Return
|
||||||
# 0 if daemon has been started
|
# 0 if daemon has been started
|
||||||
# 1 if daemon was already running
|
# 1 if daemon was already running
|
||||||
|
Loading…
Reference in New Issue
Block a user