2. Don't I get any credit I helped with this one too back when it was "Just Another Shell Script"? lol. :tongue.gif:
3. I found an error. With the say feature. It will actually say "Say (what you typed)" on the console instead of just saying it. There was an extra say I removed. You have it print the argument "say" so it doesn't need the hardcoded "say".
I recently changed my script so that the update process warns the users first about the server shut down if it is online. I did this because I don't like to run update and restart. When they both do it...IDK, why it wasn't there before.
if [[ 1 -eq $ONLINE ]]; then
case $2 in
# "30 Second Warning."
screen -S $SCREEN_NAME -p 0 -X stuff "$(printf "say Server will restart in 30s !\r")"
# "10 Second Warning."
screen -S $SCREEN_NAME -p 0 -X stuff "$(printf "say Server will restart in 10s !\r")"
Rollback Post to RevisionRollBack
You shall bow down to the Supreme Ki of MineCraft!
Since you are essentially using a copy of my Screen PID detection code in your script, I thought I should let you know that Tachdelan reported an issue with this code that could potentially affect your script.