Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- # servers template [cfg, additional cmdline params]
- servers = Array[
- ["crudream"],
- ["gw2"],
- ["danzig"],
- ["32in24-5"],
- ["udm1"],
- ["udmx"],
- ["dwango12"],
- ["ksutra", "-file ksutra.wad"],
- ["requiem", "-file requiem.wad"],
- ["pl2", "-iwad plutonia.wad -file pl2.wad"],
- ["wos", "-file wos.wad"],
- ["duel1"],
- ["duel2"]
- ]
- # file paths (use trailing slashes!)
- cfgpath="/home/tm512/cfgs/"
- wadpath="/home/tm512/iwads/:/home/tm512/pwads/"
- logpath="/home/tm512/logs/"
- puts "Using " + wadpath + " as the WAD directory/directories."
- puts ARGV[0]
- system "export DOOMWADPATH=" + wadpath
- for i in servers
- next if ARGV[0] != i[0] and ARGV[0] != nil
- if i[1] != nil
- cmd = "odasrv -config " + cfgpath + i[0] + ".cfg +logfile " + logpath + i[0] + ".log " + i[1] + " -background 1 > /dev/null &"
- puts "==> " + cmd
- system cmd
- else
- cmd = "odasrv -config " + cfgpath + i[0] + ".cfg +logfile " + logpath + i[0] + ".log -background 1 > /dev/null &"
- puts "==> " + cmd
- system cmd
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement