Merge pull request #6832 from ghjm/service_command

Improve the ansible-tower-service script
This commit is contained in:
Ryan Petrello 2020-04-24 15:24:40 -04:00 committed by GitHub
commit 04e6482f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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