Ok, so I've made a file called pub.sh
Code:
#!/bin/bash
screen -X -S pub quit
sleep 10
screen -A -m -d -S pub ./hlds_run -game cstrike +ip 70.34.195.6 +port 27018 +maxplayers 21 +map de_dust2 -autoupdate -pingboost 3
Then I did chmod +x pub.sh
(I tested this bash script and it works fine.)
My question now is, am I doing the crontab right?
In /etc/crontab, I put this value to make it restart at 6am daily:
Code:
00 6 * * * gamer /home/gamer/cstrike/pub/pub.sh
Is that correct? Is it correct putting "gamer" in front of the command to run to make sure it runs as gamer and not as root?