Last active
May 9, 2019 08:37
-
-
Save downloadpizza/e8e93cfad0697012b7c7f284da306b3d to your computer and use it in GitHub Desktop.
Read my server.sh description, this is a wrapper, which allows control c without killing the script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
trap t_exit INT | |
function t_exit() { | |
read -p "Exit? y/N: " ext | |
if [[ "y" = "$ext" ]];then | |
exit 1 | |
fi | |
} | |
while true | |
do | |
./server | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment