This script is designed to be run using cronjobs on Linux
basic knowledge of linux
crontab
fxserver
- Put file into the base directory of the fx server.
- Edit the server_restart.sh and name the screen session whatever you want it to be.
- Make the script executable
chmod u+x server_restart.sh
- If your server is already running, run the script to restart it and make sure you have installed it right - Server should stop and restart.
- If your server is not running, Run the script - Server should start a new screen session named after what you have put the the file you edited.
- Edit the servers cronjobs
crontab -e
and add this line to the bottom.
0 12 * * * cd /location to/server && ./restart_server.sh
This will restart your server at midnight everyday, you can change the time and add another line with another time if you would like restarts more frequently
- Sit back, relax and not have to worry about manually restarting the server.
If you have any other services you think may need restarting on a FX server restart put in a pull request.