SRCDS Steam group


Steam hlds/srcds install script
#1
Ok, this is an idea i just got, and i want to share it with you. read it, and see what you think:

A script to download/install/update/config your hlds/srcds installation with only a few questions, example:

you download our install scripts, then simply run it.
it starts with a question where you want your installation.

Code:
Where do you want to install your Steam gameservers? [Default: /home/$user/games/]:

it will ask what kind of server, hl1 or hl2 (since we cant mix them)

Code:
What type of server do you want to run? [hl1/hl2/both]:

based on the choise it will make a /home/$user/games/srcds_l or an /home/$user/games/hlds_l

now we know that type it will be (or both) type of mod will be choosen later on.

now we know where, and what type, time to download an UPDATED (not the steampowered1) steam file, maybe build in mirror list.

Code:
First config ready, please press enter to start downloading steam updatetool.

it downloaded it the current dir (or maybe we can get it to wget/"ftp get" to /home/$user/games
then copy it into the correct gameserver type, and if its provided in .tar.gz uncompress it before putting it in there.

so steam file is in place in the correct gameserver. time to create an account or update.

Code:
Do you want to create a new account? [Y/n]

if yes it will ask for the following things:
username;
password;
secret question;
secret qeestions awnser;

and will make an account for you.

if you choose not to create an account, it will ask for existing username/password so it can download/update.

Code:
Please provide your username:
Please provide your password:

now we have:
or created a new account, or got existing account information.

time to get the show on the road and start downloading the files with the steam file, and the account info, but only after we ask what kind of mod the admin wants to run. aka all hl1 mods and/or hl1 mods, depending on what he chose with the server type.

Code:
What type of mods do you want to run in your hl1 server?[Default: All; cstrike/hldm/tfc/...etc

well it starts downloading.
after its done downloading we can ask for server.cfg settings. like hostname, password yes/no, maxplayers etc etc etc.

this is basicly my idea, but i lack the time and knowhow to make such a script. so if 1 of you guys can make it, and has the time, let me know. if you have any ideas, plz let me know also.

Japje
To be (an admin), or not to be (an admin), that is the Question.
http://japje.nl/steam/install steam linux install guide for cs 1.6
Reply
#2
I'm not a fan of interactive scripts in Linux, so I'd suggest just making all the input into command line pararms, and issuing a usage explanation if the script is run with no parameters.

The credentials entered should be stored in a credentials file as shell variables, with mode 600. I'd suggest ~/.srcds/credentials. It should look something like this:

Code:
SRCDS_USER=mr_random
SRCDS_PASSWD=bigsecret
SRCDS_QUESTION="Who am I"
SRCDS_ANSWER="Nobody special"

The hard part about writing a script like this is trapping errors from the various Valve-supplied srcds utilities and handling them appropriately. The script should also be restartable, picking up where it left off if it failed the last time part way through.
Reply
#3
I have written a script, but it is in german. This is my first big bash script.

http://www.mani-admin-plugin.com/index.php?option=com_smf&Itemid=26&topic=662.0

Some functions:
* test for uncompress, bzip2, screen, wget
* downloads hldsupdatetool.bin, start it and install the requiered mods (config file)
* global mappool
* links all servers (only one installation is required)
* make all required directorys
* makes maplist.txt for the hl2 mods mappool
* update servers, test for new files an link them
* start, stop, restart servers
* fast install of new servers
* one configruration file
* configuration file for the installed servers (start commands, maxplayers, tickrate, mod ....)
* silent mode to update your server with a cronkob
* test for other steam updating processes (doesn't work perfect)
* can bzip all customfiles (at the time same directory, keep all files)
* a little configuration menu for the installed servers


If you want I can translate the script.
I use the script on our 2 root servers.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)