mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
fix issue #26161: on RedHat family systems touch /var/lock/subsys/$SERVICE to ensure the daemon will be stopped on shutdown.
This commit is contained in:
parent
bcca1b4c5a
commit
a83a5de41e
@ -73,7 +73,10 @@ start() {
|
||||
RETVAL=1
|
||||
else
|
||||
daemon --pidfile=$PID_FILE --check $SERVICE $SALTAPI $CONFIG_ARGS
|
||||
RETVAL=0
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && touch /var/lock/subsys/$SERVICE
|
||||
echo
|
||||
return $RETVAL
|
||||
fi
|
||||
fi
|
||||
RETVAL=$?
|
||||
@ -97,6 +100,10 @@ stop() {
|
||||
fi
|
||||
else
|
||||
killproc $PROCESS
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$SERVICE
|
||||
return $RETVAL
|
||||
fi
|
||||
RETVAL=$?
|
||||
echo
|
||||
|
@ -64,6 +64,10 @@ start() {
|
||||
fi
|
||||
else
|
||||
daemon --check $SERVICE $SALTMASTER -d $MASTER_ARGS
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && touch /var/lock/subsys/$SERVICE
|
||||
echo
|
||||
return $RETVAL
|
||||
fi
|
||||
RETVAL=$?
|
||||
echo
|
||||
@ -86,6 +90,10 @@ stop() {
|
||||
fi
|
||||
else
|
||||
killproc $PROCESS
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$SERVICE
|
||||
return $RETVAL
|
||||
fi
|
||||
RETVAL=$?
|
||||
echo
|
||||
|
@ -69,6 +69,10 @@ start() {
|
||||
echo -n "already running"
|
||||
else
|
||||
daemon --check $SERVICE $SALTMINION -d $MINION_ARGS
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && touch /var/lock/subsys/$SERVICE
|
||||
echo
|
||||
return $RETVAL
|
||||
fi
|
||||
fi
|
||||
RETVAL=$?
|
||||
@ -94,6 +98,7 @@ stop() {
|
||||
else
|
||||
killproc $PROCESS
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$SERVICE
|
||||
# tidy up any rogue processes:
|
||||
PROCS=`ps -ef | grep "$SALTMINION" | grep -v grep | awk '{print $2}'`
|
||||
if [ -n "$PROCS" ]; then
|
||||
|
@ -65,6 +65,10 @@ start() {
|
||||
fi
|
||||
else
|
||||
daemon --check $SERVICE $SALTSYNDIC -d $SYNDIC_ARGS
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && touch /var/lock/subsys/$SERVICE
|
||||
echo
|
||||
return $RETVAL
|
||||
fi
|
||||
RETVAL=$?
|
||||
echo
|
||||
@ -87,6 +91,10 @@ stop() {
|
||||
fi
|
||||
else
|
||||
killproc $PROCESS
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$SERVICE
|
||||
return $RETVAL
|
||||
fi
|
||||
RETVAL=$?
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user