With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
If you have any trouble with SG, this is the place to ask.

Moderator: Pardner

Quick guide for creating server on Linux.

Postby dansh » Thu Aug 23, 2012 7:15 pm

Sometimes on e-mail ask how to install and run the server Smokin' Guns. I wrote a little guide on how it's convenient for me. Moreover, where it is more convenient to link to official site than to explain by email. Maybe it will be useful to someone else.

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
Last edited by dansh on Sat Feb 02, 2013 11:29 pm, edited 1 time in total.
User avatar
dansh
Shootist
 
Posts: 93
Joined: Mon Jan 23, 2012 2:49 pm
Location: RF



Re: Quick guide for creating server on Linux.

Postby Tequila » Fri Aug 24, 2012 1:05 am

Thank you dansh for this quick tutorial !

I also added a link to here on site server tutorials page to give it more visibility.
:twisted:

Join Smokin'Guns Return room on Discord
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Re: Quick guide for creating server on Linux.

Postby dansh » Fri Aug 24, 2012 5:59 am

Thanks, Tequila. It would be great if users could edit/add articles manual, as in Wiki.
User avatar
dansh
Shootist
 
Posts: 93
Joined: Mon Jan 23, 2012 2:49 pm
Location: RF



Re: Quick guide for creating server on Linux.

Postby Tequila » Sat Aug 25, 2012 10:19 am

This is just a matter of rights. And we will give rights to anyone requesting it !

I need to take time to clarify that soon ;)

Join Smokin'Guns Return room on Discord
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Re: Quick guide for creating server on Linux.

Postby Munny Shot » Tue Oct 09, 2012 6:21 pm

Thanks for the quick setup guide, it was very useful.
I thought I would add that if you should get any error message from Debian (or Debian derivatives like Ubuntu) when running subsequent apt-get commands along the lines of:
Code: Select all
insserv: warning: script 'sgserver.sh' missing LSB tags and overrides

then you might want to use the following script tweaked for LSBinit compatability:
Code: Select all
#!/bin/bash

### BEGIN INIT INFO
# Provides:          sgserver
# Required-Start:   
# Required-Stop:     
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop Smokin'Guns server
### END INIT INFO

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


Cheers :twisted:
User avatar
Munny Shot
Drifter
 
Posts: 22
Joined: Tue Oct 09, 2012 6:09 pm



Re: Quick guide for creating server on Linux.

Postby Munny Shot » Thu Oct 24, 2013 3:13 pm

Hi Dansh: I've built a 64-bit server recently and I went to grab the 64-bit server updates you posted above and the link is dead. Any chance you can make them available somewhere please?

On a similar and probably related topic, your PPA has been down for ages. Are you still intending to maintain this for smokin' guns?
Cheers.
User avatar
Munny Shot
Drifter
 
Posts: 22
Joined: Tue Oct 09, 2012 6:09 pm




Return to Doc's Office

Show Sidebar
Show Sidebar

User Control Panel

cron