Forum
Servers
Auto restart server in Shut down
Auto restart server in Shut down
6 replies
1

You can use this condition to determine whether a process is running or not (there are other ways though):
1
2
3
4
5
6
2
3
4
5
6
if ps aux | grep "CounterStrike2D.exe" > /dev/null then 	echo "Running" else echo "Stopped" fi
2 - Type;
1
2
3
2
3
vi cron.sh (paste the code) Press CTRL + C (one time) and type :wq to save
1
chmod 755 cron.sh
It's a example for save the file and set the permissions, but @
TopNotch: script won't restart your server when crash, just an example. 1
pgrep cs2d_dedicated || ./cs2d_dedicated &
1

Auto restart server in Shut down
Offline
