Page 1 of 1

How do you host via cmd line?

Posted: Thu Aug 09, 2012 4:16 pm
by Catastrophe
How do you host a server [st or zandronum], via command line?

RE: How do you host via cmd line?

Posted: Thu Aug 09, 2012 4:27 pm
by Ænima
In IDE/DS, make a server config and save it as a batch. Then open that batch up with Notepad and take a look at the command line it uses. Should give you some ideas. :)

RE: How do you host via cmd line?

Posted: Thu Aug 09, 2012 5:41 pm
by Ijon Tichy
well you COULD do some huge command line like

Code: Select all

zandronum -host -port 10666 -iwad doom2.wad -file derp.wad derp2.wad +dmflags 1337 +dmflags2 9212 +dmflags3 0 +compatflags 0 +compatflags2 0 +sv_cheats 1 +sv_infiniteammo 1 +map map32 +sv_hostname "Land of Derp" +sv_website "www.derp.com"
... etcetcetc

but I would recommend making a server config file, something like this (for exactly what's up there):

Code: Select all

dmflags 1337
dmflags2 9212
dmflags3 0
compatflags 0
compatflags2 0

sv_cheats 1
sv_infiniteammo 1

sv_hostname "Land of Derp"
sv_website "www.derp.com"

map map32
then just do

Code: Select all

zandronum -host -port 10666 -iwad doom2.wad -file derp.wad derp2.wad +exec roflconfig.cfg
it saves a lot of typing in the long run

RE: How do you host via cmd line?

Posted: Thu Aug 09, 2012 7:58 pm
by Catastrophe
Thanks! One more Q, how do I set up voting through the config? (Like disabling useless votes like pointlimit)

RE: How do you host via cmd line?

Posted: Thu Aug 09, 2012 8:09 pm
by Boko
All the flags should ( well should because its a timesaver) be saved into a file you call [insertname].ini . If you like (might as well) I'll get you started....

Code: Select all

sv_hostname "Zandronum <<<<}]--Rave.FM--[{>>>> Batman Doom"
masterhostname "master.zandronum.com:15300"
sv_showlauncherqueries false

sv_website "http://boko.fathax.com" 

addmap map01
addmap map02
addmap map03
addmap map04 
addmap map05 
addmap map06 
addmap map07 
addmap map08 
addmap map09 
addmap map10 
addmap map11 
addmap map12 
addmap map13 
addmap map14 
addmap map15 
addmap map16 
addmap map17 
addmap map18 
addmap map19 
addmap map20 
addmap map21 
addmap map22 
addmap map23 
addmap map24 
addmap map25
addmap map26 
addmap map27
addmap map28
addmap map29 
addmap map30
addmap map31
addmap map32
skill 3 

timelimit 0

winlimit 0

pointlimit 0

duellimit 0

sv_maxplayers 16
sv_maxclients 16

sv_motd "
Our IRC: irc.zandronum.com #Rave-FM"

sv_broadcast 1
sv_markchatlines true
sv_maprotation true

sv_randommaprotation 0

sv_forcejoinpassword false

sv_forcepassword false

sv_updatemaster 1
sv_nocallvote false

sv_disallowbots true

sv_rconpassword [insert rcon pass here]
sv_weaponstay true

sv_itemrespawn true
sv_enforcebans true
sv_banfile banlist.txt
sv_adminlistfile adminlist.txt
sv_banexemptionfile whitelist.txt
sv_hostemail [insert host email here]
sv_maxpacketsize 1920
Note: i put sv_maxpacketsize there to help with brutaldoom's lag with overuse of actors.. not for batmandoom tbh...

RE: How do you host via cmd line?

Posted: Thu Aug 09, 2012 8:36 pm
by Catastrophe
Thank you! I'm sure this topic well help others in the near future

RE: How do you host via cmd line?

Posted: Thu Aug 09, 2012 8:39 pm
by Boko
Should be stickied for greater justice!

RE: How do you host via cmd line?

Posted: Mon Jan 21, 2013 1:06 pm
by ZzZombo
Example batch file that I use:

Code: Select all

@echo Starting [game and version] with [mod name]...
:restart
@zandronum +exec server.cfg -iwad doom2 -host -port 10666 -file [.WADs] +[game mode] 1 +map [start map] +addmap [maps] +dmflags [value] +dmflags2 [value] +dmflags3 [value] +compatflags [value] +compatflags2 [value] +sv_hostname "[value]" [random mod-dependent stuff, for example, +teamdamage 1.0]
@echo Server might crashed, restarting (close this windows and then the server otherwise).
@goto restart
Spoiler: server.cfg (Open)

Code: Select all

logfile "logs/server"
sv_rconpassword [value]
alwaysapplydmflags 1
lmsspectatorsettings 3
sv_maprotation 1
sv_randommaprotation 0
sv_motd "Welcome to [server name]! [stuff]"
sv_website "http://grandvoid.sickedwick.net/wads/"
sv_password ""
sv_forcepassword 0
sv_joinpassword ""
sv_forcejoinpassword 0
sv_maxlives 0
skill 4
sv_broadcast 1
sv_updatemaster 1
sv_maxclients 32
sv_maxplayers 32
sv_disallowbots 1
alias slq "toggle sv_showlauncherqueries"
SV_ShowWarnings 0
SV_TimeStamp 1
sv_banfilereparsetime 600
sv_defaultdmflags 0

RE: How do you host via cmd line?

Posted: Mon Jan 21, 2013 7:02 pm
by Tenchu
IMO, batch files are one of the easiest methods of hosting. If you use Linux/BSD like me, then all you ever have to do to start the server is type:

Code: Select all

./duel32pub.sh
And bam, the server is up. Here's an example of a batch file for a public Duel32 server:

Code: Select all

#!/bin/sh
cd /home/doom/skulltag/
  /home/doom/skulltag/zandronum-server -host \
  +duel 1 \
  -port 10670 \
  -iwad "/home/doom/skulltag/wads/doom2.wad" \
     -file "/home/doom/skulltag/wads/duel32a.pk3" \
     -file "/home/doom/skulltag/wads/skulltag_data.pk3" \
     -file "/home/doom/skulltag/wads/skulltag_actors.pk3" \
  +exec /home/doom/skulltag/cfgs/duel32pub.cfg
I'm not going to bother throwing up an example of the .cfg file as there's already been a few shown here and it's basically the same thing (just with Duel32 settings). You can obviously use batch files on Windows as well, I just CBA to make an example for one. Also for Linux/BSD users, don't forget to use Screen/Tmux so that the server isn't attached to your Putty session (if that wasn't obvious already).

RE: How do you host via cmd line?

Posted: Sat Nov 02, 2013 7:00 am
by Govik
I am having trouble using +sv_motd and +sv_website in a batch file.

here is what I have from the "command line" option from doomseeker that I copied to make my batch.

Code: Select all

+sv_motd "\"Welcome to Govik's Realm - Deathmatch - SkullTag Maps -  BrutalDOOMv19 - Server!\n\nPlay fair, and have fun.\n\nAdmin: Govik\"

+sv_website "\"http://goviksrealm.net/downloads/wads/\"
any help on properly formatting this would be greatly appreciated.

Thanks in advance

*Update*

I figured out how to get +sv_website working right, I used.

Code: Select all

+sv_website "http://goviksrealm.net/downloads/wads/"
However, if I try the same with the MOTD taking out the "\ and \ the batch file just opens and closes and the server doesn't start.

also wondering about -port, I am useing

Code: Select all

-port 10669
the server console on start up says "cant bind to 10667 binding to 10669" so it seems like it's trying to bind to 10667 instead of forcing 10669 it does change to 10669 but that, I'm assuming, is because it's not in use and not because of the -port command.

again any advice/help is greatly appreciated. want to have servers start on my PC's start up and not have to use the doomseeker's server starter.

I think I figured out the port issue further down the server console it says "server using alternate port 10669" fairly confident that means it changed it to 10669 or rather is forcing 10669

RE: How do you host via cmd line?

Posted: Sat Dec 14, 2013 6:37 pm
by oldskool
Hello,

How do you do a autorestart if server crashes for linux?

The above post is for windows.

i did something like this basic but i run 2 servers how do monitor individuals?
because it just sees zandronum server not the actual wad that is being hosted.

Code: Select all

#!/bin/bash

zandronum=`ps ax | grep hr2final | grep -v grep | wc -l`

if [ $zandronum -eq 1 ]
then
exit
else
cd /home/gameserv/.doomseeker ; ./hr2final start
fi
Simple crontab

Code: Select all

*/5 * * * * sh /home/gameserv/.doomseeker/crash.sh

RE: How do you host via cmd line?

Posted: Sat Dec 14, 2013 8:46 pm
by Konar6
You could be launching the server using an infinite loop inside a bash script. When the server process exits, it will be restarted by the script.

RE: How do you host via cmd line?

Posted: Sun Dec 15, 2013 1:11 am
by oldskool
Thank you could you please give an example?, This code i posted i found online. I'm not that linux literate

RE: How do you host via cmd line?

Posted: Sun Dec 15, 2013 3:08 am
by Ijon Tichy

Code: Select all

while true
do
    zandronum <shit>

    if [ "$?" -eq "0" ]  # Allow proper exits to break the loop
    then
        break
    fi
done