11-15-2010, 01:41 PM
I have found some scripts to auto-restart when server crashes or you use rcon quit, like this script: *****forums.steampowered.com/forums/showpost.php?p=6480002&postcount=7, but that scripts doesn't work any more.
|
Srcds linux auto-restart script
|
|
11-15-2010, 01:41 PM
I have found some scripts to auto-restart when server crashes or you use rcon quit, like this script: *****forums.steampowered.com/forums/showpost.php?p=6480002&postcount=7, but that scripts doesn't work any more.
11-15-2010, 01:42 PM
Linux servers already do have Auto-Restart...
(11-15-2010, 01:42 PM)Hovercat Wrote: Linux servers already do have Auto-Restart... That when the server crashes, but if i use quit or exit command in console, the server shutdown. Oh I found it, this is the script for anybody who want to use quit or exit to restart your server Step 1. Code: #!/bin/bash
# Restart script by devianTlinux
SCREEN_NAME="Set your screen name here"
count=1
while [ $count ]
do
# If no screen under that name was found...
if [[ `screen -ls | grep $SCREEN_NAME` == "" ]]
then
# Nothing was found running ; restart the server.
cd /your/srcds/dir/ ; screen -A -d -m -S $SCREEN_NAME ./srcds_run -game cstrike +map de_dust -secure +maxplayers 12
fi
doneEdit this script and save as run.sh, chmod +x run.sh 2. Use this command: screen -A -d -m -S run ./run.sh
11-15-2010, 10:14 PM
I'm pretty sure that if you run the srcds_run script, it will have auto restart.
11-15-2010, 11:23 PM
You could make a shell script with something like:
Code: if ["netstat -a | grep 27015" == "*:27015"]; then
./server.sh
else
echo "No shit to do LOL!"
fi
SlÄ den med jeres fiberforbindelser...
[IMG]*****www.speedtest.net/result/1308107839.png[/IMG]
11-17-2010, 07:24 AM
(11-15-2010, 11:23 PM)duydangle Wrote:(11-15-2010, 10:14 PM)Hovercat Wrote: I'm pretty sure that if you run the srcds_run script, it will have auto restart.I have tried, when i use "rcon quit" it said server shutdown Have you tried adding "-autoupdate" to the startup line? I believe that does have an effect on restarting. |
|
« Next Oldest | Next Newest »
|