ok i run a server fro 4 of my mates on my linux box thes two scripts i use to start the server the first is irrelevent as its the stats server the second is the focus of my attention and the one that needs help with
Code:
#!/bin/sh
cd /home/mrgreaper/srcds_1/
screen -A -m -d -S css-server ./srcds_run -priority 3 -game cstrike -ip 172.16.1.37 -port 27015 -rcon_port 27015 +map as_oilrig_wk +maxplayers 32 -nomaster -insecure +sv_lan 1
the +map bit is the important bit now im on the wrong forum if i was to ask how to make that bit random? yes and no you see heres my idea;
i create 10 scripts maybe more each identicle except for the +map bit that would have a different map name in each
then one script that picks 1 script at random to run out of the 10
but i dont even know if thats possible im guessing if commands maybe even a random command i just dont know
the other alternative is a bit more complicated but i think may work ;
get script to delete a tempory script first (the reason will be clear later) then pick from a list of map names one map name and to record that name to a string (i think thats the name) then create a tempory script file and echo in all of the details in the top script except were +map as_oilrig_wk is it would place the string contents
im hoping someone out theree is reading this and thinking "interesting" or better yet "easy" maybe im asking to much of the linux shell system but it all seems doable in a theory sense i just dont have the knowledge to do it