Rsync Configuration

To install a game using rsync, the game.xml file must have this line

Install the Rsync service on Ubuntu with
apt-get install rsync
Create /etc/rsyncd.conf and put the following entries:

use chroot = yes
read only = yes
path = /var/www/files/rsync
comment = RSYNC source of game installs
log file = /var/www/html/panel/rsyncd.log
dont compress = *.pk3
refuse options = delete

Change to the rsync games directory, where all current available games folders are located, as listed in the rsyncd.conf (/var/www/files/rsync)
Create a new folder for this game, in order to find out the correct name, you will need to look at the XML file and use the “query name” . I have an easier method using the Game Key which is unique and has the same name as the xml file usually.
For example, the cstrike_linux32.xml will by default be installed into a folder named halflife. My method will install into cstrike_linux32. Its up to you, its a simple edit.

Change to the new game folder, then create a folder for each OS, Linux and Windows, for example: cstrike_linux32/linux and put the files of the game server for each OS inside its respective OS folder.

At some point you will need to install the actual games into the game folders. I create a script that will update all the files at once. This is part of that script that downloads the Terraria server into our Rsync folders. At the bottom of the files I run the script that will update our sizes.list and rsync.list and then copies them to the panel.

cd /var/www/files/rsync/terraria_linux
mv 1353/Linux linux
rm -r 1353
cp serverconfig.txt linux/

cd /var/www/files/rsync

Now lets start the Rsync daemon and then set rsync to start when the system reboots

systemctl start rsync
systemctl enable rsync

Now lets test if the rsync is running , you should get the Name and Desc from the rsync.conf file

rsync -rdt rsync://localhost:873/

Overwrite sizes.list and rsync.list at modules/gamemanager/ with your custom files.
To do this we need to CREATE these two files first. So in your Linux terminal browse to the folder you have your rsync files located (/var/www/files/rsync) and enter these two commands. You MUST run them EVERY TIME you add or update your rsync files.
The first line creates your sizes.list.
The second line creates your rsync.list
These two files MUST be copied into the gamemanager module of your OGP panel.

du -sLlk /| awk '{print $2";"$1}'>sizes.list
ls -d1 */|tr -d />rsync.list

Add your rsync domain or ip, and location, to modules/gamemanager/rsync_sites_local.list|My Local Rsync Server

Leave a Reply