LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   restart teamspeak server if when it crashes (https://www.linuxquestions.org/questions/linux-software-2/restart-teamspeak-server-if-when-it-crashes-476091/)

MrSako 08-21-2006 10:38 PM

restart teamspeak server if when it crashes
 
im going to be hosting a teamspeak server. i want to make it so itll be like how other people host their servers when it crashes itll automatically start back up.

i guess (or hope) this is a task i could apply to other servers. bassicaly i need a way to say

if blah blah blah server crashes then run script located at x location on the server. (the script im referring to is a smal lscript i wrote to start the server)

unless theres a way to monitor the process and automaticaly restart it witohut having to know the proper way to start it

dive 08-22-2006 04:00 PM

The usual way to do it is to make an endless loop with the server start up command in the middle:

Code:

while [ true ]
do
    <command to start server>
done

put that in a bash script and use it to start server


All times are GMT -5. The time now is 06:11 AM.