mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Fix #4410, make sure that "ssh root@host -C service salt-minio restart" will return.
This commit is contained in:
parent
ee5ddb4972
commit
5c58d4f245
@ -65,11 +65,22 @@ start() {
|
||||
fi
|
||||
else
|
||||
if [ $(pidofproc $PROCESS) ]; then
|
||||
RETVAL=$?
|
||||
echo -n "already running"
|
||||
RETVAL=$?
|
||||
echo -n "already running"
|
||||
else
|
||||
daemon --check $SERVICE $SALTMINION -d $MINION_ARGS
|
||||
RETVAL=$?
|
||||
# The RHEL 'daemon' function doesn't redirect stdout/err
|
||||
# quite right, executing 'service salt-minion start' as a one-off
|
||||
# over ssh like 'ssh root@ip -C service salt-minion start'
|
||||
# will not return.
|
||||
|
||||
# daemon --check $SERVICE $SALTMINION -d $MINION_ARGS
|
||||
# RETVAL=$?
|
||||
if $PYTHON $SALTMINION -d $MINION_ARGS >& /dev/null; then
|
||||
echo_success
|
||||
RETVAL=0
|
||||
else
|
||||
RETVAL=$?
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user