Added proper exit codes to the wrapper
This commit is contained in:
parent
dba741003f
commit
be35cc586a
1 changed files with 4 additions and 0 deletions
4
cloudbot
4
cloudbot
|
@ -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
|
Reference in a new issue