mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
daemons_running() : add a proper way to check SmartOS running services
This commit is contained in:
parent
bdcf090fc2
commit
f1172e0e35
1 changed files with 6 additions and 1 deletions
|
@ -2540,7 +2540,12 @@ daemons_running() {
|
|||
[ $fname = "master" ] && [ $INSTALL_MASTER -eq $BS_FALSE ] && continue
|
||||
[ $fname = "syndic" ] && [ $INSTALL_SYNDIC -eq $BS_FALSE ] && continue
|
||||
|
||||
if [ "x$(ps aux | grep -v grep | grep salt-$fname)" = "x" ]; then
|
||||
if [ ${DISTRO_NAME} == "SmartOS" ]; then
|
||||
if [[ $(svcs -Ho STA salt-$fname) != "ON" ]]; then
|
||||
echoerror "salt-$fname was not found running"
|
||||
FAILED_DAEMONS=$(expr $FAILED_DAEMONS + 1)
|
||||
fi
|
||||
elif [ "x$(ps aux | grep -v grep | grep salt-$fname)" = "x" ]; then
|
||||
echoerror "salt-$fname was not found running"
|
||||
FAILED_DAEMONS=$(expr $FAILED_DAEMONS + 1)
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue