Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- navigate into your teamspeak directory, for me it would be cd /home/ts3/teamspeak3-server_linux-amd64
- type nano tscc.sh (ts crash checker)
- Change the line ending with (*) to your needs and delete the (*) afterwards
- paste the code below (if you use 32bit, change the ts3server_linux_amd64 to 32)
- Code:
- #!/bin/bash
- TEAMSPEAK=`ps ax | grep ts3server_linux_amd64 | grep -v grep | wc -l`
- if [ $TEAMSPEAK -eq 1 ]
- then
- exit
- else
- /home/ts3/teamspeak3-server_linux-amd64/./ts3server_startscript.sh start (*)
- fi
- save the file
- type chmod +x tscc.sh
- type crontab -e
- navigate to the bottom of the file
- type */2 * * * * /home/ts3/teamspeak3-server_linux-amd64/./tscc.sh (change the path to your needs. You may change the time, also)
- exit with CTRL-X
- You are done! The script will check every two minutes, whether your ts-server is running, if not.. it will restart it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement