KingJ Posted December 31, 2008 Share Posted December 31, 2008 Using TCAdmin, is there any way to automatically put the contents on a web server and add the correct sv_downloadurl parameter in their server.cfg? Currently, we setup a download url on request for users on an IIS website, giving them a subdirectory of their server ID. If there is any way to automatically add their subdirectory to IIS, or any other webserver that could be run on an alternative port and set the parameter in the server.cfg i'd like to know - it would save us a lot of time. I know you can simply give users some separate webspace to act as a sv_downloadurl but then they have to upload all content twice and does not account for any map packs or mods the users install via TCAdmin, this is why direct access is preferred. Thanks. Link to comment Share on other sites More sharing options...
iLight Posted December 31, 2008 Share Posted December 31, 2008 What I think you mean is that tcadmin automatically create a virtual host for folders like : maps, materials, ... and that they can access to these folders with an adresse like : customer.yourcompany.com/downloadurl/ and then they can use that adresse for a download url ? I don't think that Tcadmin do that. Maybe in next version? But I don't know... Have to install IIS on each server then make an A redirection for each domain. Hard to make a script for that. Link to comment Share on other sites More sharing options...
KingJ Posted December 31, 2008 Author Share Posted December 31, 2008 Yes, automatic virtual directory provision on any webserver software. I don't mind setting up a webserver on each server but having to setup the sv_downloadurl for each user and remove it when they've gone is a real pain. Link to comment Share on other sites More sharing options...
maddanny Posted January 1, 2009 Share Posted January 1, 2009 Why not using install/uninstall scripts ? You can do a lot of things with this feature Link to comment Share on other sites More sharing options...
Dan M Posted January 1, 2009 Share Posted January 1, 2009 Yeah I would suggest seeing if install/uninstall scripts could do the job. We just stopped fastdownload by default and made the user request it via support tickets Link to comment Share on other sites More sharing options...
KingJ Posted January 1, 2009 Author Share Posted January 1, 2009 I'll have a look into that, there must be some way to script the adding of virtual directories. However, I still have to manually add in the correct URL into their server.cfg - unless this can be scripted too? How did you do it previously Dan? As you do it on request now I guess you had some form of automated system previously? Edit: Looking around there is a handy script that MS provide with IIS called iisvdir.vbs which lets you add/delete vdirs from IIS from command line. I could almost certainly integrate this with the Install/Uninstall script options. I'll have a play around with it and let you know how it goes. Link to comment Share on other sites More sharing options...
KingJ Posted January 1, 2009 Author Share Posted January 1, 2009 Okay, i've come up with the following script for install: iisvdir /create "Download Redirects" "%serverip%:%serverport%" "%userfilespath%" and for uninstall: iisvdir /delete "Download Redirects"/"%serverip%:%serverport%" The install script will need to be altered slightly for each game, as %userfilespath% points to the root directory rather than the cstrike folder for example (Edit: Just found that I can set the %userfilespath% to the correct path in the game config, why it isn't at cstrike already I don't know). Other than that, it's all working! Thanks for the tip off about the install/uninstall scripts - didn't think of that. However, I don't see an option to run the install script on an existing server. I do have existing servers that i'd like to run this on. The only way I can think of running the script (from TCAdmin, I could run it externally...) is to move the server to another and back again (Time/Data consuming) or reinstall the server (upon which all data is lost). Are there any other options for running the install script from TCAdmin? Also, here is a bit of SQL you can run to add this install/uninstall script to all Source and GoldSRC servers: UPDATE tc_games SET INSTALL_SCRIPT = 'iisvdir /create "Download Redirects" "%serverip%:%serverport%" "%userfilespath%"' WHERE `RELATIVE_EXECUTABLE` LIKE '%SRCDS%' OR `RELATIVE_EXECUTABLE` LIKE '%HLDS%' UPDATE tc_games SET UNINSTALL_SCRIPT = 'iisvdir /delete "Download Redirects"/"%serverip%:%serverport%"' WHERE `RELATIVE_EXECUTABLE` LIKE '%SRCDS%' OR `RELATIVE_EXECUTABLE` LIKE '%HLDS%' You will have to correctly set the user files path yourself however. At least you can easily set this bit! Link to comment Share on other sites More sharing options...
JasonF Posted January 1, 2009 Share Posted January 1, 2009 KingJ Try using %gameserverroot% instead of %userfilespath% Link to comment Share on other sites More sharing options...
KingJ Posted January 1, 2009 Author Share Posted January 1, 2009 What path does %gameserverroot% return? sv_downloadurl requires the root of the given URL to be the inside of the mod folder (i.e the contents of cstrike, tf etc), not the contents of the folder containing srcds.exe I've set all the user file paths to the appropriate mod directory, and now the setup of sv_downloadurl in IIS is working fine. All I need to know now is a way to execute the setup script from within TCAdmin after a server has been installed. Link to comment Share on other sites More sharing options...
JasonF Posted January 1, 2009 Share Posted January 1, 2009 %gameserverroot% - C:\UserFiles\username\T1238238923892\ %userfilespath% - C:\UserFiles\username\ If you want it to point to the cstrike folder, then just use -> %gameserverroot%cstrike\ When it prints out it should be C:\UserFiles\username\T1238238923892\cstrike\ Link to comment Share on other sites More sharing options...
Dan M Posted January 1, 2009 Share Posted January 1, 2009 Wouldn't this set all the folders, including the cfg folder so their server.cfg can be read from a web accessible location and reveal rcon password? Link to comment Share on other sites More sharing options...
KingJ Posted January 1, 2009 Author Share Posted January 1, 2009 %gameserverroot% - C:\UserFiles\username\T1238238923892\ %userfilespath% - C:\UserFiles\username\ If you want it to point to the cstrike folder, then just use -> %gameserverroot%cstrike\ When it prints out it should be C:\UserFiles\username\T1238238923892\cstrike\ That's not what i'm seeing. For me, %userfilespath% produces the root path (e.g C:\Servers\username\T1238238923892) combined with the "Relative User Files Directory" defined in the game config. So I a user is located in C:\Servers\username\T1238238923892 and the game is cstrike, %userfilespath% is C:\Servers\username\T1238238923892\cstrike, which is the correct directory for the sv_urldownload base. Link to comment Share on other sites More sharing options...
peace Posted July 12, 2009 Share Posted July 12, 2009 Hey. I wonder what can block creating VD? Any ideas? Im using iisvdir.vbs /create "sitename" "foldername" "pointpath" or iisvdir /create "sitename" "foldername" "pointpath" I typed that in comand line and nothing has happened. Link to comment Share on other sites More sharing options...
Jaggl Posted July 12, 2009 Share Posted July 12, 2009 http://clientforums.tcadmin.com/showthread.php?t=3387 Link to comment Share on other sites More sharing options...
peace Posted July 12, 2009 Share Posted July 12, 2009 http://clientforums.tcadmin.com/showthread.php?t=3387 is about IIS 5.0 and here is 6.0. Link to comment Share on other sites More sharing options...
dimitrifrom31 Posted July 13, 2009 Share Posted July 13, 2009 C:\Inetpub\AdminScripts\mkwebdir.vbs -c LocalHost -w "1" -v "VD NAME HERE","VD PATH HERE" Link to comment Share on other sites More sharing options...
iLight Posted July 13, 2009 Share Posted July 13, 2009 what's about server.cfg, files etc? Link to comment Share on other sites More sharing options...
iLight Posted July 13, 2009 Share Posted July 13, 2009 iisvdir /create "Download Redirects" "87.98.131.182:27015" "C:\UserFiles\ADMIN\GameServers\TC21584618180557782530483\cstrike" Connecting to server ...Done. Could not find website Download Redirects Type IIsVDir /create /? for help. Link to comment Share on other sites More sharing options...
peace Posted July 14, 2009 Share Posted July 14, 2009 I have found that problem with scripts was about KAV 7. Now i can create VD through CMD by iisvdir /create command. But nothing happents whet i use script through TCA panel. Link to comment Share on other sites More sharing options...
KingJ Posted July 14, 2009 Author Share Posted July 14, 2009 iisvdir /create "Download Redirects" "87.98.131.182:27015" "C:\UserFiles\ADMIN\GameServers\TC21584618180557782530483\cstrike" Connecting to server ...Done. Could not find website Download Redirects Type IIsVDir /create /? for help. You need to have a Website in IIS called "Download Redirects", see the attachment for details. Link to comment Share on other sites More sharing options...
iLight Posted July 14, 2009 Share Posted July 14, 2009 Thanks ! It works well, but another question, if I block the reading of the virtual website, does the sv_downloadurl will still work? So I can protect the cfg files.. Link to comment Share on other sites More sharing options...
peace Posted July 15, 2009 Share Posted July 15, 2009 As you may know by default file's extensions such as .bsp or .cfg cant be downloaded from web site. You have to set that type of files in MIME Types menu: go to IIS menu, Properties of your website, than HHTP Headers and MIME Types than click New and set file extension. On my web site i have reading permission and i advise you not to set Directory Browsing box so users cant browse web site. Link to comment Share on other sites More sharing options...
tehrichie Posted July 23, 2009 Share Posted July 23, 2009 What do you set the sv_downloadurl to after this? Link to comment Share on other sites More sharing options...
tehrichie Posted July 23, 2009 Share Posted July 23, 2009 Missing map error everytime trying to connect to the server. Did I miss a step in the IIS process? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.