Skip to content

Commit

Permalink
fix restore.sh unreachable code
Browse files Browse the repository at this point in the history
  • Loading branch information
seoseonyu committed Jan 31, 2024
1 parent 5f16b77 commit e5f6fab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if [ -f "$BACKUP_FILE" ]; then
echo "RCON is not enabled. Please enable RCON to use this feature."
fi
printf "\e[0;32mShutdown complete.\e[0m\n"

trap - ERR

trap 'restore_error_handler' ERR
Expand Down Expand Up @@ -98,13 +98,14 @@ if [ -f "$BACKUP_FILE" ]; then
rm -rf "./tmp_save"

printf "\e[0;32mRestore complete!!!! Please restart the Docker container\e[0m\n"


trap - ERR
exit 0
else
echo "The selected backup file does not exist."
trap - ERR
exit 1
fi
trap - ERR
else
echo "Abort the recovery."
exit 1
Expand Down

0 comments on commit e5f6fab

Please sign in to comment.