Skip to content

Commit

Permalink
exit codes improved and fixed exit after wrong token
Browse files Browse the repository at this point in the history
  • Loading branch information
simylein committed May 2, 2021
1 parent 3bcb143 commit d54ab4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ if [[ ${REPLY} == "CONFIRM VENTING" ]]; then
echo "User confirmed venting - I will self-destruct now"
else
echo "wrong token - please try again"
exit 1
fi

# write date to logfile
Expand Down Expand Up @@ -80,7 +81,7 @@ if ! screen -list | grep -q "\.${servername}"; then
if ! [ -d "${serverdirectory}" ]; then
# game over terminal screen
PrintGameOver
exit 1
exit 0
else
# error if serverdirectory still exists
echo "${red}venting failed!${nocolor}"
Expand Down Expand Up @@ -150,7 +151,7 @@ rm -r ${servername}
if ! [ -d "${serverdirectory}" ]; then
# game over terminal screen
PrintGameOver
exit 1
exit 0
else
# error if serverdirectory still exists
echo "${red}venting failed!${nocolor}"
Expand Down

0 comments on commit d54ab4b

Please sign in to comment.