From e36ffa5764230fbcd21ffdbb624276e758cf3bf7 Mon Sep 17 00:00:00 2001 From: Graham Mainwaring Date: Fri, 24 Apr 2020 11:37:16 -0400 Subject: [PATCH] Return more status information from ansible-tower-service status and error check commands better --- tools/scripts/ansible-tower-service | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/scripts/ansible-tower-service b/tools/scripts/ansible-tower-service index 775d7165be..57efc3c01b 100755 --- a/tools/scripts/ansible-tower-service +++ b/tools/scripts/ansible-tower-service @@ -1,4 +1,16 @@ #!/bin/bash -# Redirect to systemctl -exec systemctl $@ ansible-tower.service +SERVICES="ansible-tower.service supervisord.service" + +case "$1" in + start|stop|restart) + systemctl $1 ansible-tower.service + ;; + status) + systemctl status $SERVICES + ;; + *) + echo "Usage: ansible-tower-service start|stop|restart|status" + exit 1 + ;; +esac