[CoD2/CoD4] Server auto-restart
Quote:
Originally Posted by Ni3ls
Hi man,
My server keeps shutting down, because of segmentation errors. When you first helped me with setting up libcod on my vps, you made some script that auto restarts the server when it's offline. Can you send me that script again? It was extremely usefull.
Greetz
PHP Code:
#!/bin/bash
while true
do
LD_LIBRARY_PATH=. LD_PRELOAD=/path/to/libcod/libcod2_1_0.so /path/to/exe/cod2_lnxded +set fs_basepath /path/to/directory +set fs_homepath /path/to/directory +set fs_game yourmod +set net_ip 999.999.999.999 +set net_port 28960 +set developer 0 +set dedicated 2 +set sv_cracked 1 +exec config.cfg +map_rotate
sleep 1
done
save as exec.sh
PHP Code:
#!/bin/bash
screen -S serv1 /path/to/exec.sh
save as serv1.sh