Results 1 to 1 of 1
Hey,
I made a automated server restarter for my minecraft server, it uses java.
Here is the code:
automaticor()
{
sleep 20
stop
sleep 1000
start
}
stop()
{
echo ...
- 09-16-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 1
MY linux shell script [HELP]
Hey,
I made a automated server restarter for my minecraft server, it uses java.
Here is the code:
automaticor()
{
sleep 20
stop
sleep 1000
start
}
stop()
{
echo "Taalas Shutter: Shutting down the server..."
screen -S minecraft_serv -X exec .\!\! echo stop
}
start()
{
echo "Taalas Starter: Starting the server..."
sleep 2
screen -S minecraft_serv -d -m java -Xmx${MEMORY}M -Xms${MEMORY}M -jar minecraft_server.jar nogui
sleep 10
automaticor
}
Okay, the problem is that, the server starts fine, but when it should shutdown the server with this cmd "screen -S minecraft_serv -X exec .\!\! echo stop" it does not. It should go back to screen and execute a "stop" command there, but it does not do it. Any help?
Thanks
Regards
Taalasmaa


Reply With Quote