AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Nemrun for SteamCMD Linux (https://forums.alliedmods.net/showthread.php?t=218555)

Powerlord 06-17-2013 16:06

Nemrun for SteamCMD Linux
 
2 Attachment(s)
So, a few people have been bugging me to release my updated version of Nemrun for SteamCMD... so here it is.

This is based on Nemrun 1.8.7.

The new (required) parameters are actually the same ones the server uses with its newer -autoupdate support:
-steam_dir - The directory steamcmd lives in. Replaces -steamdir which was for hldsupdatetool.
-steamcmd_script - The steamcmd script to run. Relative paths are treated as relative from the steam_dir.

Note: This includes srcdsupdatecheck from Nemrun 1.8.7.

Edit: I wonder if the reason Nephyrin didn't update this for SteamCMD himself is because he now works for Valve.

Smarmy 06-17-2013 16:35

Re: Nemrun for SteamCMD Linux
 
Thanks. :bacon!:

moxie2020 07-03-2013 19:08

Re: Nemrun for SteamCMD Linux
 
Quote:

Originally Posted by Powerlord (Post 1972196)
So, a few people have been bugging me to release my updated version of Nemrun for SteamCMD... so here it is.

This is based on Nemrun 1.8.7.

The new (required) parameters are actually the same ones the server uses with its newer -autoupdate support:
-steam_dir - The directory steamcmd lives in. Replaces -steamdir which was for hldsupdatetool.
-steamcmd_runscript - The steamcmd script to run. Relative paths are treated as relative from the steam_dir.

Note: This includes srcdsupdatecheck from Nemrun 1.8.7.

Thank you again. Totally rocks.

Dr. McKay 07-11-2013 19:25

Re: Nemrun for SteamCMD Linux
 
Does anyone have any clue why SteamCMD won't update steam.inf on my servers? (That's plural, it's happening on all three systems). steam.inf won't update with the new version number so nemrun never restarts the servers to update.

Powerlord 07-11-2013 19:28

Re: Nemrun for SteamCMD Linux
 
Quote:

Originally Posted by Dr. McKay (Post 1988957)
Does anyone have any clue why SteamCMD won't update steam.inf on my servers? (That's plural, it's happening on all three systems). steam.inf won't update with the new version number so nemrun never restarts the servers to update.

No idea. It appears to be working on my Prop Hunt server, although I've noticed that the -cleandownloads option doesn't seem to work any more... I should probably fix that.

Dr. McKay 08-19-2013 19:53

Re: Nemrun for SteamCMD Linux
 
I just realized that I never gave my solution...

SteamCMD wasn't updating my steam.inf file so nemrun never thought the server was fully updated. To fix it, I had to switch my user-relative path (~/tfserver) to an absolute path (/home/user/tfserver).

Powerlord 11-01-2013 10:24

Re: Nemrun for SteamCMD Linux
 
Two things:

I just noticed the first post had the command listed as -steamcmd_runscript. It's actually -steamcmd_script.

I also want to post the command lines I use with nemrun_steamcmd to give people an idea of how it works, at least if you use it in its update daemon mode.

For TF2, my update daemon is running like this:

Code:

#!/bin/bash
# Source Dedicated Server Init Script for Nemrun

# Server options
NAME='updater'                          # Server handle for the screen session
STEAM='/home/tf2/tf2'            # Path to STEAM installation
USER='tf2'

STEAM_DIR='../steamcmd'
STEAMCMD_SCRIPT='tf2update.txt'
SHARED_SCREENS='tf2'
cd $STEAM

screen -d -m -U -S $NAME ./nemrun-steamcmd \
-nemlog "runlogs/updater_%Y%m%d%H%M%S.log" \
-cleandownloads 10 -autoupdate -steam_dir $STEAM_DIR \
-steamcmd_script $STEAMCMD_SCRIPT -sharedscreens $SHARED_SCREENS -updatefirst \
\
-game tf -updatedaemon

My game server is running like this:

Code:

#!/bin/bash
# Source Dedicated Server Init Script for Nemrun

# Server options
NAME='tf2'                              # Server handle for the screen session
DAEMON='srcds_run'                      # The server daemon
STEAM='/path/to/server'            # Path to STEAM installation
USER='tf2'

# Game options
IP='1.2.3.4'                            # IP of the server
PORT='27015'                            # Port number to use
MAP='plr_hightower_event'                # Initial map to start
MAPCYCLE='mapcycle_halloween.txt'
GAME='tf'                              # Game type (tf|cstrike|valve|hl2mp)
SIZE='24'                              # Maximum number of players
CONFIGFILE='server-halloween.cfg'        # Config file to use in cfg directory
SOURCEMOD='addons/sourcemod-halloween'
MOTDFILE='motd-halloween'

cd $STEAM

# Server options string
OPTS="-game $GAME +map $MAP -ip $IP -port $PORT \
    +maxplayers $SIZE +sv_pure 1 +mapcyclefile $MAPCYCLE \
    +servercfgfile $CONFIGFILE -strictportbind +sm_basepath $SOURCEMOD \
    +motdfile ${MOTDFILE}.txt +motdfile_text ${MOTDFILE}_text.txt \
    -replay"

screen -d -m -U -S $NAME ./nemrun-steamcmd \
-nemlog "runlogs/tf2_%Y%m%d%H%M%S.log" \
-corefile "cores/tf2_%Y%m%d%H%M%S.core" \
\
$OPTS

Note that cleandownloads is actually broken at the moment... I need to take the time to fix it at some point.

Blackglade 11-12-2013 19:57

Re: Nemrun for SteamCMD Linux
 
Is this still supported (meaning does it work) and err does it have all the features that the original Nemrun with running multiple servers off 1 installation and auto updating...?

eric0279 07-09-2014 22:09

Re: Nemrun for SteamCMD Linux
 
Hi,

where is emailTheAdmins.sh and notifyadmins.sh?

Powerlord 07-10-2014 09:52

Re: Nemrun for SteamCMD Linux
 
Quote:

Originally Posted by Blackglade (Post 2060161)
Is this still supported (meaning does it work) and err does it have all the features that the original Nemrun with running multiple servers off 1 installation and auto updating...?

Not sure how I never replied to this, but this should still be operational and I still use it on my Linux TF2 server.

Quote:

Originally Posted by eric0279 (Post 2164894)
Hi,

where is emailTheAdmins.sh and notifyadmins.sh?

Those have never actually been shipped with NemRun... you actually have to write them yourself.

There are reasons for this...
1. notifyadmins.sh doesn't specify how to contact the admins.
2. emailTheAdmins.sh would need to be written differently depending on how your server is set up... if it has a sendmail binary (installed by most mail servers) it could use that, but otherwise it'd have to talk SMTP directly with a remote mail server.

Also, just because it has a .sh extension doesn't strictly mean it's a shell script... it could be written in perl or python and passed the perl/python interpreter on the first line (the shebang line).

eric0279 07-11-2014 16:15

Re: Nemrun for SteamCMD Linux
 
Ok thanks

ph 07-13-2014 08:23

Re: Nemrun for SteamCMD Linux
 
For windows ?

Powerlord 07-13-2014 11:55

Re: Nemrun for SteamCMD Linux
 
Quote:

Originally Posted by ph (Post 2166902)
For windows ?

Nemrun is Linux only.

To be clear, I didn't write Nemrun (Nephyrin did that), I just updated it to work with SteamCMD.

moxie2020 10-21-2014 02:10

Re: Nemrun for SteamCMD Linux
 
In the example there is some use of taskset. Can you explain how this works and if there is any use to it?

Powerlord 10-22-2014 11:27

Re: Nemrun for SteamCMD Linux
 
Quote:

Originally Posted by moxie2020 (Post 2213813)
In the example there is some use of taskset. Can you explain how this works and if there is any use to it?

taskset is used to control which cores a server can use. It can be handy if you're running multiple servers from the same machine.

However, by the same token, TF2 and DOTA's replay systems can do things on other threads, so limiting those to a single CPU forces it to do that processing on the same CPU core.

Side note: CPU cores are 0-numbered, so a 4 core processor has cores 0-3. Of course, to specify core numbers, you use the -c argument to taskset... it's a lot easier than using bitmasks.

Powerlord 11-17-2014 11:12

Re: Nemrun for SteamCMD Linux
 
Quote:

Originally Posted by Chdata (Post 2224795)
tbh I have no idea what nemrun is meant to do. It's able to only do update checks / validate when the server actually needs to? ;o

Except I looked at it at a time where I had a headache.

OK, here's my current test server configuration. Note that it could probably be optimized more by making the server use sv_shutdown to do a delayed restart instead of its normal shutdown command.

Spoiler

Chdata 01-20-2015 00:38

Re: Nemrun for SteamCMD Linux
 
Can I have an example of a 'unified' steamCMD script?

Because currently I use something like...

vsh_dis.txt
Code:

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
login anonymous
force_install_dir ../vsh
app_update 232250 validate
exit

And there's another one for each of my other two servers that only changes the folder.

Also I'm just going to assume one first executes 'tf2_updater.sh' and then 'prophunt_server.sh' or 'whatever.sh' for all of one's servers?

And from there this thing handles autoupdating them... or not going through a full file check if there's no need to?

Also... I don't see anything that shuts down the server in what you posted? No kill or quit or exit or restart or shutdown command seems to be in the snippet you posted.

Chdata awaits the day his question is answered clearly.

Powerlord 01-20-2015 09:39

Re: Nemrun for SteamCMD Linux
 
Quote:

Originally Posted by Chdata (Post 2251306)
Can I have an example of a 'unified' steamCMD script?

Because currently I use something like...

vsh_dis.txt
Code:

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
login anonymous
force_install_dir ../vsh
app_update 232250 validate
exit

And there's another one for each of my other two servers that only changes the folder.

Also I'm just going to assume one first executes 'tf2_updater.sh' and then 'prophunt_server.sh' or 'whatever.sh' for all of one's servers?

And from there this thing handles autoupdating them... or not going through a full file check if there's no need to?

Also... I don't see anything that shuts down the server in what you posted? No kill or quit or exit or restart or shutdown command seems to be in the snippet you posted.

Chdata awaits the day his question is answered clearly.

nemrun is intended to be used with screen. The -sharedscreens argument is a comma-separated list of named screens (-S in the screen command-line) that it should send a "quit" command to. Since these screens were presumably also started with nemrun, they will auto-restart when they get the quit command.

Do note that it's possible to run a custom shell script instead using the -shutdownscript command-line argument or change which command is sent to servers using -sharedkillcommand .

dedimark 03-16-2016 11:44

Re: Nemrun for SteamCMD Linux
 
delete


All times are GMT -4. The time now is 18:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.