Changes

Finalize the Setup
##Install ''[http://software.clapper.org/daemonize/ daemonize]'' (for use in our init.d script) by running <pre>sudo apt install daemonize</pre>
##Create a new service file by running <pre>sudo nano /etc/init.d/quakejs</pre>
##Fill the file with the following <pre>#!/bin/sh&#10;#&#10;### BEGIN INIT INFO&#10;# Provides: quakejs&#10;# Required-Start: $network&#10;# Required-Stop:&#10;# Default-Start: 2 3 4 5&#10;# Default-Stop:&#10;# Short-Description: QuakeJS Server Daemon&#10;### END INIT INFO&#10;&#10;#&#10;# /etc/init.d/quakejs&#10;# Subsystem file for "quakejs" server&#10;#&#10;# chkconfig: 2345 95 05&#10;# description: QuakeJS server daemon&#10;#&#10;# processname: quakejs&#10;# pidfile: /var/run/quakejs.pid&#10;&#10;RETVAL=0&#10;prog="quakejs"&#10;&#10;start() {&#10; echo "Starting $prog:"&#10; 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&#10; RETVAL=$?&#10; [ "$RETVAL" = 0 ] && touch /var/lock/subsys/$prog&#10; echo&#10;}&#10;&#10;stop() {&#10; echo "Stopping $prog:"&#10; killproc $prog -TERM&#10; RETVAL=$?&#10; [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/$prog&#10; echo&#10;}&#10;&#10;case "$1" in&#10; start)&#10; start&#10; ;;&#10; stop)&#10; stop&#10; ;;&#10; restart)&#10; stop&#10; sleep 3&#10; start&#10; ;;&#10; condrestart)&#10; if [ -f /var/lock/subsys/$prog ] ; then&#10; stop&#10; # avoid race&#10; sleep 3&#10; start&#10; fi&#10; ;;&#10; status)&#10; status $prog&#10; RETVAL=$?&#10; ;;&#10; *)&#10; echo $"Usage: $0 {start|stop|restart|condrestart|status}"&#10; RETVAL=1&#10;esac&#10;exit $RETVAL&#10;</pre>
##Make our new file executable by running <pre>sudo chmod +x /etc/init.d/quakejs</pre>
##Enable it by running <pre>sudo update-rc.d quakejs defaults</pre>