Created
July 12, 2021 10:28
-
-
Save Rmlyy/6e4755d1e2fa4681d4da206ef697b636 to your computer and use it in GitHub Desktop.
Auto-restart shell 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
#!/bin/sh | |
while true | |
do | |
java -Xms512M -Xmx512M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -jar waterfall.jar | |
for s in 5 4 3 2 1 | |
do | |
echo "Restarting in ${s} second(s)..." | |
sleep 1 | |
done | |
echo "Restarting now!" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment