summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/backend_control.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-09-04 20:22:34 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-09-04 20:22:34 (GMT)
commitc23fd707e1cd4dd901a0ec5532aa0cbcecbd023e (patch)
treeef51faaa412a8f7b38d199c084bc5fb4db05739a /abs/core/LinHES-config/backend_control.sh
parent10dd549ffabc3120c4d0de6ff094bd7223aee613 (diff)
downloadlinhes_pkgbuild-c23fd707e1cd4dd901a0ec5532aa0cbcecbd023e.zip
linhes_pkgbuild-c23fd707e1cd4dd901a0ec5532aa0cbcecbd023e.tar.gz
linhes_pkgbuild-c23fd707e1cd4dd901a0ec5532aa0cbcecbd023e.tar.bz2
LinHES-config: backend_control.sh if the be controls could not be contancted on 1337 then tell the user about it.
Diffstat (limited to 'abs/core/LinHES-config/backend_control.sh')
-rwxr-xr-x[-rw-r--r--]abs/core/LinHES-config/backend_control.sh28
1 files changed, 22 insertions, 6 deletions
diff --git a/abs/core/LinHES-config/backend_control.sh b/abs/core/LinHES-config/backend_control.sh
index ab58bac..24c6551 100644..100755
--- a/abs/core/LinHES-config/backend_control.sh
+++ b/abs/core/LinHES-config/backend_control.sh
@@ -11,18 +11,34 @@ dbhost=`echo $LAST`
MESSAGE=""
case $COMMAND in
stop) MESSAGE=`/usr/bin/curl http://$dbhost:1337/bestop.cgi 2>/dev/null`
+ rc=$?
+ if [ $rc != 0 ]
+ then
+ lh_message.sh "Could not stop the backend."
+ fi
;;
-
- start )
+
+ start )
MESSAGE=`/usr/bin/curl http://$dbhost:1337/bestart.cgi 2>/dev/null`
+ rc=$?
+ if [ $rc != 0 ]
+ then
+ lh_message.sh "Could not start the backend"
+ fi
;;
-
+
restart)
/usr/MythVantage/bin/backend_control.sh stop $dbhost
sleep 2
- /usr/MythVantage/bin/backend_control.sh start $dbhost
+ /usr/MythVantage/bin/backend_control.sh start $dbhost
+
;;
- clearcache)
- MESSAGE2=`/usr/bin/curl http://$dbhost:1337/beclear.cgi 2>/dev/null`
+ clearcache)
+ MESSAGE2=`/usr/bin/curl http://$dbhost:1337/beclear.cgi 2>/dev/null`
+ rc=$?
+ if [ $rc != 0 ]
+ then
+ lh_message.sh "Could not clear the cache"
+ fi
esac