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

Editing crontab -e to Terminate PalServer-Linux and Reboot the Server

  1. 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.
  2. 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)
  1. 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.
  2. The second line in white tells the server to reboot 1 minute later using the /sbin/shutdown -r +1 command
  3. Lines 3-8 are repeats of lines 1-2, but with different times. Refer to the following link for cronjob command formatting
  4. Press [ctrl+x] to exit, then press [Y] to confirm the changes to the crontab file, then press [Enter] to save the file.

Running the PalServer_update_run.sh script after reboot to start PalServer-Linux

This section refers to the PalServer_update_run.sh script in this repo

  1. Download the PalServer_update_run.sh script and place in the desires directory of the server.
  2. 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.
  3. 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)
  1. 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).
  2. Press [ctrl+x] to exit, then press [Y] to confirm the changes to the crontab file, then press [Enter] to save the file.