Added proper exit codes to the wrapper

This commit is contained in:
neersighted 2012-03-03 15:13:13 -08:00
parent dba741003f
commit be35cc586a

View file

@ -77,6 +77,7 @@ processargs() {
start) start)
if running; then if running; then
echo "Cannot start! Bot is already running!" echo "Cannot start! Bot is already running!"
exit 1
else else
echo "Starting CloudBot... ($backend)" echo "Starting CloudBot... ($backend)"
start start
@ -88,6 +89,7 @@ processargs() {
stop stop
else else
echo "Cannot stop! Bot is not already running!" echo "Cannot stop! Bot is not already running!"
exit 1
fi fi
;; ;;
restart) restart)
@ -97,6 +99,7 @@ processargs() {
start start
else else
echo "Cannot restart! Bot is not already running!" echo "Cannot restart! Bot is not already running!"
exit 1
fi fi
;; ;;
clear) clear)
@ -122,3 +125,4 @@ main() {
} }
main $* main $*
exit 0