Tip: Setting Server to Auto Reboot - muhubi/PalWorldServer-Linux GitHub Wiki
Due to the memory leak issues in PalServer, the best way to help mitigate the issue is to restart the application and/or reboot the server. This page goes over how to (1) terminate the PalServer-Linux application, (2) reboot the server, and (3) run the PalServer_upate_run.sh
script
crontab -e
to Terminate PalServer-Linux and Reboot the Server
Editing - Using the terminal enter the following command
sudo crontab -e
and press enter. Since this command requires root/sudo privileges please enter your root password and then press enter. - The following window will open in your terminal, using your text editor of choice, if you did not select one it will prompt you to select one (this guide will use nano)
- The first line in white tells the server to run the command
pkill PalServer-Linux
at 0500 UTC. Crontab commands default to UTC, so convert as needed. - The second line in white tells the server to reboot 1 minute later using the
/sbin/shutdown -r +1
command - Lines 3-8 are repeats of lines 1-2, but with different times. Refer to the following link for cronjob command formatting
- Press [ctrl+x] to exit, then press [Y] to confirm the changes to the crontab file, then press [Enter] to save the file.
PalServer_update_run.sh
script after reboot to start PalServer-Linux
Running the This section refers to the PalServer_update_run.sh script in this repo
- Download the PalServer_update_run.sh script and place in the desires directory of the server.
- Using the terminal enter the following command
sudo nano /etc/crontab
and press enter. Since this command requires root/sudo privileges please enter your root password and then press enter. - The following window will open in your terminal, using your text editor of choice, if you did not select one it will prompt you to select one (this guide will use nano)
- At the bottom of the file, add the following command
@reboot [username] ~/[Directory]/PalServer_update_run.sh
. Make sure to enter the username of the home user where the script lives, it does not need to be the root user (note how my example uses my username "muhubi"). Enter the path and the script name (note: my script in my server was named before I renamed it on GitHub). - Press [ctrl+x] to exit, then press [Y] to confirm the changes to the crontab file, then press [Enter] to save the file.