mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #8931 from dchen1107/clean
Fix the race when monit is used to monitor services which are also
This commit is contained in:
commit
6274d845b9
@ -40,6 +40,13 @@ DAEMON_USER=root
|
||||
#
|
||||
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!
|
||||
ulimit -n 65536
|
||||
|
||||
|
@ -39,6 +39,13 @@ DAEMON_USER=root
|
||||
#
|
||||
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
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
|
Loading…
Reference in New Issue
Block a user