Skip to content

Instantly share code, notes, and snippets.

View jyc's full-sized avatar

jyc

View GitHub Profile
@jyc
jyc / stop.sh
Created December 29, 2011 01:28 — forked from anonymous/stop.sh
Minecraft stop.sh
#!/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\""
}
@jyc
jyc / stop.sh
Created December 29, 2011 01:27 — forked from anonymous/stop.sh
#!/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"