1,575
edits
Changes
→Finalize the Setup
=Finalize the Setup=
#Create a init.d file Configure Debian to enable autorun our server to start on boot
##Run <pre>sudo nano /etc/init.d/quakejs</pre>
##Fill the file with the following <pre>### BEGIN INIT INFO # Provides: quakejs # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: QuakeJs Server # Description: Starts/Stops/Restarts the QuakeJS Server Daemon ### END INIT INFO set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="QuakeJS Server" NAME=quakejs-server USER=quake DIR=/home/quake/quakejs DAEMON=node build/ioq3ded.js +set fs_game baseq3 set dedicated 1 +exec server.cfg #PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 sleep 2 sudo -u $USER $DAEMON $1 $OPTIONS
##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 defauts</pre>