Advertisement
Guest User

Untitled

a guest
Sep 8th, 2013
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.52 KB | None | 0 0
  1. export MINETEST=/usr/local/bin/minetestserver
  2. export GAME=minetest
  3. export CONF=.minetest/minetest.conf
  4. export PORT=30000
  5. export NAME=awesome-server
  6.  
  7. if [ `ps aux | grep $MINETEST | grep $PORT | wc -l` -eq 1 ]
  8. then
  9.     return
  10. fi
  11.  
  12. if [ -e ~/mt-maintenence ]
  13. then
  14.     echo `date +"%x %X"` "$NAME down for maintenence" >> ~/serverstatus.log
  15. else
  16.     echo `date +"%x %X"` "$NAME started" >> ~/serverstatus.log
  17.     $MINETEST --config ~/$CONF --gameid $GAME --port $PORT --map-dir ~/.minetest/worlds/$NAME 2>> ~/server-$NAME.log
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement