Gamer-Server-Utility-Scripts/Minecraft/Modded/mccheck.sh

11 lines
369 B
Bash
Raw Normal View History

#!/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