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:
Rohit Jnagal 2015-05-29 11:23:21 -07:00
commit 6274d845b9
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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