User Tools

Site Tools


games:quake:setup_a_local_quakejs_server:create_a_quakejs_service

Games - Quake - Setup a local QuakeJS server - Create a QuakeJS service

Install daemonize

Used in the init.d script.

sudo apt install daemonize

Create the Service Script

Copy the service script to where it goes:

sudo cp ~/quakejs/init.d/quakejs /etc/init.d/quakejs

Edit the startup script

Edit the /etc/init.d/quakejs file, change:

/etc/init.d/quakejs
daemonize -v -p /var/run/$prog.pid -c /home/quake/quakejs -u quake /usr/bin/node build/ioq3ded.js +set fs_game baseq3 set dedicated 1 +exec server.cfg

to

/etc/init.d/quakejs
daemonize -v -p /var/run/$prog.pid -c /root/quakejs /usr/bin/node build/ioq3ded.js +set fs_game baseq3 set dedicated 1 +exec server.cfg

NOTE: This setup has Quake running in a Container, so no need to have a separate user account.

  • Therefore changing this to root.

Enable the Service Script

sudo update-rc.d quakejs defaults

Complete

Whenever your Quake server boots up it will automatically start the QuakeJS game server and Apache2 webserver.

When a computer visits http://192.168.1.137/ they will automatically download the files they need from http://192.168.1.137/assets/ and then connect to the QuakeJS server at http://192.168.1.137:27960.

Have people point their browsers to http://192.168.1.137/ and enjoy!

NOTE: Instead of http://192.168.1.137/ in the above, a DNS could be configured with a nicer name.

Test

sudo systemctl start quakejs
systemctl status quakejs

NOTE: Now try to connect to the server.


Continue Playing Setup

games/quake/setup_a_local_quakejs_server/create_a_quakejs_service.txt · Last modified: 2021/07/06 12:55 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki