{"action":"created","issue":{"url":"https://api.github.com/repos/dgibbs64/linuxgsm/issues/307","labels_url":"https://api.github.com/repos/dgibbs64/linuxgsm/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/dgibbs64/linuxgsm/issues/307/comments","events_url":"https://api.github.com/repos/dgibbs64/linuxgsm/issues/307/events","html_url":"https://github.com/dgibbs64/linuxgsm/pull/307","id":59408155,"number":307,"title":"Config select","user":{"login":"ilijamt","id":1139427,"avatar_url":"https://avatars.githubusercontent.com/u/1139427?v=3","gravatar_id":"","url":"https://api.github.com/users/ilijamt","html_url":"https://github.com/ilijamt","followers_url":"https://api.github.com/users/ilijamt/followers","following_url":"https://api.github.com/users/ilijamt/following{/other_user}","gists_url":"https://api.github.com/users/ilijamt/gists{/gist_id}","starred_url":"https://api.github.com/users/ilijamt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilijamt/subscriptions","organizations_url":"https://api.github.com/users/ilijamt/orgs","repos_url":"https://api.github.com/users/ilijamt/repos","events_url":"https://api.github.com/users/ilijamt/events{/privacy}","received_events_url":"https://api.github.com/users/ilijamt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-01T17:33:45Z","updated_at":"2015-05-09T15:19:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dgibbs64/linuxgsm/pulls/307","html_url":"https://github.com/dgibbs64/linuxgsm/pull/307","diff_url":"https://github.com/dgibbs64/linuxgsm/pull/307.diff","patch_url":"https://github.com/dgibbs64/linuxgsm/pull/307.patch"},"body":"This will allow you to create different configurations for a game instead of just copying the file to a different name like it's explained in http://danielgibbs.co.uk/lgsm/csgoserver/#Multiple_Servers.\r\n\r\nThe way it works is it looks for any files that have extension **appid** which is the app id for the game on steam.\r\n\r\nIf there are no files like that or if there is only one file, then the script behaves the same as before this modification.\r\n\r\nIf there is more than one available config then you will have to select which one you want to use.\r\n\r\nExample:\r\n\r\n##### csgo_tick64.740\r\n```\r\n#!/bin/bash\r\ntickrate=\"64\"\r\nport=\"27015\"\r\nsourcetvport=\"27020\"\r\nclientport=\"27005\"\r\n```\r\n\r\n##### csgo_tick128.740\r\n```\r\n#!/bin/bash\r\ntickrate=\"128\"\r\nport=\"27016\"\r\nsourcetvport=\"27021\"\r\nclientport=\"27006\"\r\nservicename=\"csgo-server128\"\r\n```\r\n\r\n````bash\r\n$ ./csgoserver\r\n[ WARN ] configuration file not specified, use one of the available ones (csgo_tick64|csgo_tick128)\r\nUsage: ./csgoserver {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install|auto-install} csgo_tick64|csgo_tick128\r\n```\r\n\r\nSo when you have multiple configuration the only thing that changes is that you add the configuration to the end of the command \r\n\r\n```bash\r\n$ ./csgoserver start csgo_tick64\r\n```\r\n\r\nYou can use the configs to override any configuration necessary in the file.\r\n\r\nThe new file *fn_select*, I didn't go over all the games to see which variables need to be reinitialized so if there are different variables for different games, they will have to be added at the end of the script in the case.\r\n\r\nThis should work on all games that are available that use steam\r\n\r\nThe snippet bellow will need to be added to the file https://github.com/dgibbs64/linuxgameservers/blob/master/CounterStrikeGlobalOffensive/csgoserver#L114\r\n\r\n```bash\r\n# init the getopt function variables\r\ngetopt=$1\r\n\r\n# init the select function variables\r\nusesrvcfg=1\r\ngetsrvcfg=$2\r\n\r\nfn_select\r\nfn_getopt\r\n```\r\n\r\n**usesrvcfg** is a safeguard that tells us if this option is enabled or not for the game"},"comment":{"url":"https://api.github.com/repos/dgibbs64/linuxgsm/issues/comments/100504897","html_url":"https://github.com/dgibbs64/linuxgsm/pull/307#issuecomment-100504897","issue_url":"https://api.github.com/repos/dgibbs64/linuxgsm/issues/307","id":100504897,"user":{"login":"dgibbs64","id":4478206,"avatar_url":"https://avatars.githubusercontent.com/u/4478206?v=3","gravatar_id":"","url":"https://api.github.com/users/dgibbs64","html_url":"https://github.com/dgibbs64","followers_url":"https://api.github.com/users/dgibbs64/followers","following_url":"https://api.github.com/users/dgibbs64/following{/other_user}","gists_url":"https://api.github.com/users/dgibbs64/gists{/gist_id}","starred_url":"https://api.github.com/users/dgibbs64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgibbs64/subscriptions","organizations_url":"https://api.github.com/users/dgibbs64/orgs","repos_url":"https://api.github.com/users/dgibbs64/repos","events_url":"https://api.github.com/users/dgibbs64/events{/privacy}","received_events_url":"https://api.github.com/users/dgibbs64/received_events","type":"User","site_admin":false},"created_at":"2015-05-09T15:19:14Z","updated_at":"2015-05-09T15:19:14Z","body":"There is a server I am currently working (Running with Rifles) that have multiple configuration files available. I believe this setup may be useful for this requirement. "}}