mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Merge pull request #6832 from ghjm/service_command
Improve the ansible-tower-service script
This commit is contained in:
@@ -1,4 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Redirect to systemctl
|
if [ -f /etc/sysconfig/ansible-tower ]; then
|
||||||
exec systemctl $@ ansible-tower.service
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user