Instructions relevant to the 32-bit and 64-bit machines.
The server will run as user.
Command in the terminal as root:
For 32-64-bit:
- Code: Select all
adduser user
su user
cd
wget http://www.smokin-guns.org/downloads/Smokin_Guns_1.1.zip
unzip Smokin_Guns_1.1.zip
rm Smokin_Guns_1.1.zip
mv "Smokin' Guns" sgserver
cd sgserver
For 32-bit:
- Code: Select all
mv smokinguns_dedicated.i386 smokinguns_dedicated
For 64-bit:
- Code: Select all
wget http://dansh.org/games/smokinguns/smokinguns_dedicated.x86_64.zip
unzip smokinguns_dedicated.x86_64.zip
rm smokinguns_dedicated.x86_64.zip
For 32-64-bit:
- Code: Select all
chmod +x smokinguns_dedicated
exit
nano /etc/init.d/sgserver.sh
write to a file /etc/init.d/sgserver.sh:
- Code: Select all
#!/bin/bash
RULE="su - user -c"
BIN="/home/user/sgserver/smokinguns_dedicated +set dedicated 2 +set net_port 27960 +set com_hunkmegs 128 +exec server.cfg >/dev/null 2>&1 &"
PROC="smokinguns_dedicated"
case "$1" in
'start')
$RULE "$BIN"
echo "Smokin' Guns server is running..."
;;
'stop')
killall $PROC
echo "Smokin' Guns server is stopped..."
;;
*)
echo "Usage: $0 start|stop"
;;
esac
exit 0
Command in the terminal:
- Code: Select all
chmod +x /etc/init.d/sgserver.sh
ln -s /etc/init.d/sgserver.sh /usr/local/bin/sgserver
Edit your /home/user/sgserver/smokinguns/server.cfg
Starting the server from the terminal:
- Code: Select all
sgserver start
Stop the server from the terminal:
- Code: Select all
sgserver stop