diff --git a/Minecraft/Modded/mccheck.sh b/Minecraft/Modded/mccheck.sh new file mode 100644 index 0000000..ca0956c --- /dev/null +++ b/Minecraft/Modded/mccheck.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if pgrep -u moddedmc java > /dev/null +then + echo "Java process is running for user 'moddedmc'" +else + echo "NO Java process running for user 'moddedmc'" + echo "MCcheck.sh found that user moddedmc didnt have a java process running and will attempt to restart the server." >> /home/moddedmc/script.log + bash /home/moddedmc/restartserver.sh +fi +exit \ No newline at end of file