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/bash | |
. common.sh | |
SLEEP_INT=10 | |
send "say The server is shutting down in 10 seconds." | |
send "say Saving the map..." | |
send "save-all" |
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/bash | |
SLEEP_INT=10 | |
SCREEN_NAME="mc" | |
AS_USER="craft" | |
send() { | |
su $AS_USER -c "screen -p 0 -S $SCREEN_NAME -X eval \"stuff '$1'\015\"" | |
} |