mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
Fix up init script to use service command, preserve the worst return
code and use that as the exit status
This commit is contained in:
@@ -26,10 +26,15 @@ fi
|
||||
|
||||
service_action() {
|
||||
for svc in ${SERVICES[@]}; do
|
||||
/etc/init.d/${svc} $1
|
||||
service ${svc} $1
|
||||
this_return=$?
|
||||
if [ $this_return -gt $worst_return ]; then
|
||||
worst_return=$this_return
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
worst_return=0
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting Tower"
|
||||
@@ -51,3 +56,4 @@ case "$1" in
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
esac
|
||||
exit $worst_return
|
||||
|
||||
Reference in New Issue
Block a user