Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API_AUTHORIZATION_KEY (webapi_key.txt) #9

Closed
winniethepoohbear opened this issue Apr 14, 2013 · 2 comments
Closed

API_AUTHORIZATION_KEY (webapi_key.txt) #9

winniethepoohbear opened this issue Apr 14, 2013 · 2 comments
Assignees

Comments

@winniethepoohbear
Copy link

webapi_authkey.txt can be defined in the game directory to avoid defining it in the launch parameters (https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators). The current script doesn't allow adding +host_workshop_collection and +workshop_start_map without -authkey being defined

Ideas:
When generating the arguments the check for API_AUTHORIZATION_KEY should include a check to see if web_authkey.txt exists at DIR_GAME/csgo/

Or, the if checks for the API_AUTHORIZATION_KEY, WORKSHOP_COLLECTION_ID, and WORKSHOP_START_MAP should be independent of API_AUTHORIZATION_KEY.

@ghost ghost assigned crazy-max Apr 15, 2013
@crazy-max
Copy link
Owner

I have added your request.
Thanks for contrib ;)

@winniethepoohbear
Copy link
Author

Thanks for adding this, you can actually remove API_AUTHORIZATION_KEY from GENERATED_ARGS if web_authkey.txt exists altogether instead of copying it from the file. This will cut down on the size of the startup parameter too which is becoming ever growing

The way I solved it is by un-nesting the if checks. You can completely remove line 85

  # Generated misc args
  GENERATED_ARGS="";
    if [ ! -z "${API_AUTHORIZATION_KEY}" ]; then GENERATED_ARGS="-authkey ${API_AUTHORIZATION_KEY}"; fi
    if [ ! -z "${WORKSHOP_COLLECTION_ID}" ]; then GENERATED_ARGS="${GENERATED_ARGS} +host_workshop_collection ${WORKSHOP_COLLECTION_ID}"; fi
    if [ ! -z "${WORKSHOP_START_MAP}" ]; then GENERATED_ARGS="${GENERATED_ARGS} +workshop_start_map ${WORKSHOP_START_MAP}"; fi

Thanks for keeping this up-to-date!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants