summaryrefslogtreecommitdiffstats
path: root/abs/core/supplemental-web/cgi/bestop.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/supplemental-web/cgi/bestop.cgi')
-rw-r--r--abs/core/supplemental-web/cgi/bestop.cgi15
1 files changed, 8 insertions, 7 deletions
diff --git a/abs/core/supplemental-web/cgi/bestop.cgi b/abs/core/supplemental-web/cgi/bestop.cgi
index c9d7fad..2d31904 100644
--- a/abs/core/supplemental-web/cgi/bestop.cgi
+++ b/abs/core/supplemental-web/cgi/bestop.cgi
@@ -1,12 +1,13 @@
#!/bin/bash
-MESSAGE="Trying to stop `hostname` B.E."
-/usr/bin/func "*" call msg display "$MESSAGE" &
-
-sudo /sbin/sv stop mythbackend
-
-MESSAGE="`hostname` B.E. stopped"
+MESSAGE="Stopping `hostname` MythBackend..."
/usr/bin/func "*" call msg display "$MESSAGE" &
+svresult=`sudo /sbin/sv stop mythbackend`
+if [[ $svresult == *"down: "* ]]; then
+ MESSAGE="`hostname` MythBackend Stopped"
+else
+ MESSAGE="`hostname` MythBackend didn't Stop"
+fi
-
+/usr/bin/func "*" call msg display "$MESSAGE" &