How do you host via cmd line?

General help and assistance forum.
Post Reply
Catastrophe
Retired Staff / Community Team Member
Posts: 2565
Joined: Sat Jun 02, 2012 2:44 am

How do you host via cmd line?

#1

Post by Catastrophe » Thu Aug 09, 2012 4:16 pm

How do you host a server [st or zandronum], via command line?

User avatar
Ænima
Addicted to Zandronum
Posts: 3576
Joined: Tue Jun 05, 2012 6:12 pm

RE: How do you host via cmd line?

#2

Post by Ænima » Thu Aug 09, 2012 4:27 pm

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. :)
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: How do you host via cmd line?

#3

Post by Ijon Tichy » Thu Aug 09, 2012 5:41 pm

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

Catastrophe
Retired Staff / Community Team Member
Posts: 2565
Joined: Sat Jun 02, 2012 2:44 am

RE: How do you host via cmd line?

#4

Post by Catastrophe » Thu Aug 09, 2012 7:58 pm

Thanks! One more Q, how do I set up voting through the config? (Like disabling useless votes like pointlimit)
Last edited by Catastrophe on Sat May 12, 2018 11:11 am, edited 1 time in total.

Boko
 
Posts: 64
Joined: Tue Jun 05, 2012 2:32 am

RE: How do you host via cmd line?

#5

Post by Boko » Thu Aug 09, 2012 8:09 pm

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...
Last edited by Boko on Thu Aug 09, 2012 8:11 pm, edited 1 time in total.

Catastrophe
Retired Staff / Community Team Member
Posts: 2565
Joined: Sat Jun 02, 2012 2:44 am

RE: How do you host via cmd line?

#6

Post by Catastrophe » Thu Aug 09, 2012 8:36 pm

Thank you! I'm sure this topic well help others in the near future
Last edited by Catastrophe on Sat May 12, 2018 10:43 am, edited 1 time in total.

Boko
 
Posts: 64
Joined: Tue Jun 05, 2012 2:32 am

RE: How do you host via cmd line?

#7

Post by Boko » Thu Aug 09, 2012 8:39 pm

Should be stickied for greater justice!

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: How do you host via cmd line?

#8

Post by ZzZombo » Mon Jan 21, 2013 1:06 pm

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

Tenchu
Retired Staff / Community Team Member
Posts: 331
Joined: Mon Jun 04, 2012 2:29 am
Location: Nocru illa dan
Clan: Lost Faction
Clan Tag: LF

RE: How do you host via cmd line?

#9

Post by Tenchu » Mon Jan 21, 2013 7:02 pm

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).
Last edited by Tenchu on Mon Jan 21, 2013 7:03 pm, edited 1 time in total.

Govik
Registered just to make one post
Posts: 1
Joined: Sat Nov 02, 2013 6:53 am
Location: USA, Utah
Contact:

RE: How do you host via cmd line?

#10

Post by Govik » Sat Nov 02, 2013 7:00 am

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
Last edited by Govik on Sat Nov 02, 2013 10:32 am, edited 1 time in total.

oldskool
New User
Posts: 14
Joined: Sun Dec 30, 2012 9:32 pm

RE: How do you host via cmd line?

#11

Post by oldskool » Sat Dec 14, 2013 6:37 pm

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
Last edited by oldskool on Sat Dec 14, 2013 7:13 pm, edited 1 time in total.

Konar6
Retired Staff / Community Team Member
Posts: 455
Joined: Sun May 27, 2012 9:38 am

RE: How do you host via cmd line?

#12

Post by Konar6 » Sat Dec 14, 2013 8:46 pm

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.
Ijon Tichy wrote:I like how your first responses to concerns being raised was to start insulting people, accusing random people on the Internet of being Shadowfox, and digging up irrelevant shit from the past. It really inspires confidence in me that you guys are level-headed and rational folks.


<BlueCool> you guys IQ is the same as my IP, Dynamic

oldskool
New User
Posts: 14
Joined: Sun Dec 30, 2012 9:32 pm

RE: How do you host via cmd line?

#13

Post by oldskool » Sun Dec 15, 2013 1:11 am

Thank you could you please give an example?, This code i posted i found online. I'm not that linux literate

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: How do you host via cmd line?

#14

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

Code: Select all

while true
do
    zandronum <shit>

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

Post Reply