mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Merge pull request #6832 from ghjm/service_command
Improve the ansible-tower-service script
This commit is contained in:
commit
04e6482f36
@ -1,4 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Redirect to systemctl
|
||||
exec systemctl $@ ansible-tower.service
|
||||
if [ -f /etc/sysconfig/ansible-tower ]; then
|
||||
source /etc/sysconfig/ansible-tower
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
exec systemctl $1 ansible-tower.service
|
||||
;;
|
||||
status)
|
||||
exec systemctl status ansible-tower.service $TOWER_SERVICES
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ansible-tower-service start|stop|restart|status"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user