{ "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL", "meta": { "version": "PTDL_v2", "update_url": null }, "exported_at": "2024-08-20T22:10:48+00:00", "name": "CS 1.6 BY OLDS.RO", "author": "shigbeard@ndlee.com", "description": "This option allows modifying the startup arguments and other details to run a custom HLDS based game on the panel, substituting the official Valve engine binaries with the ReHLDS binaries.", "features": [ "steam_disk_space" ], "docker_images": { "ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source" }, "file_denylist": [], "startup": ".\/hlds_run -console -game {{HLDS_GAME}} -port {{SERVER_PORT}} -sport {{VAC_PORT}} +map {{SRCDS_MAP}} +ip 0.0.0.0 -strictportbind -norestart +maxplayers 32 -pingboost 2 +sys_ticrate 1200", "config": { "files": "{}", "startup": "{\r\n \"done\": \"Connection to Steam servers successful\"\r\n}", "logs": "{}", "stop": "quit" }, "scripts": { "installation": { "script": "#!\/bin\/bash\r\n#HEADER\r\n# SRCDS Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\necho -e \"ALERT DELETING EVERYTHING BYE\"\r\ncd \/mnt\/server && rm -rf *\r\necho -e \"ALERT DELETED EVERYTHING BYE\"\r\n\r\n# just in case someone removed the defaults.\r\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n# Run SteamCMD to install the game\r\n.\/steamcmd.sh \\\r\n+force_install_dir \/mnt\/server \\\r\n+login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} \\\r\n+app_set_config 90 mod ${HLDS_GAME} \\\r\n$( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) \\\r\n+app_update ${SRCDS_APPID} \\\r\n$( [[ -z ${SRCDS_BETAID} ]] || printf %s \"-beta ${SRCDS_BETAID}\" ) \\\r\n$( [[ -z ${SRCDS_BETAPASS} ]] || printf %s \"-betapassword ${SRCDS_BETAPASS}\" ) \\\r\n${INSTALL_FLAGS} validate \\\r\n+quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\ncd \/mnt\/server\r\n#HEADER\r\n\r\n# ###################################\r\n# Download and install default server\r\n# Variables\r\nREPO_OWNER=\"oldstyle-community\"\r\nREPO_NAME=\"cstrike_default\"\r\n\r\n# Get the latest release data\r\nRELEASE_DATA=$(curl -s https:\/\/api.github.com\/repos\/$REPO_OWNER\/$REPO_NAME\/releases\/latest)\r\n\r\n# Extract the tag name and the download URLs for the archives\r\nTAG_NAME=$(echo $RELEASE_DATA | jq -r '.tag_name')\r\n\r\nDOWNLOAD_URL=$(echo $RELEASE_DATA | jq -r '.zipball_url')\r\nOUTPUT_FILE=\"$REPO_NAME-$TAG_NAME.zip\"\r\n\r\n# Delete file if exists\r\nrm -rf ${REPO_OWNER}-*\r\n\r\n# Download the archive\r\necho \"Downloading $OUTPUT_FILE from $DOWNLOAD_URL...\"\r\ncurl -L -o $OUTPUT_FILE $DOWNLOAD_URL\r\n\r\n# Check if the download was successful\r\nif [ $? -eq 0 ]; then\r\n echo \"Download completed successfully: $OUTPUT_FILE\"\r\nelse\r\n echo \"Failed to download the archive.\"\r\n exit 1\r\nfi\r\n\r\n# Unzip the archive\r\nunzip -q -o $REPO_NAME-$TAG_NAME.zip\r\n\r\n# Clean\r\nrm -rf $REPO_NAME-*.zip\r\n\r\n# Path to server and modules\r\ncd $REPO_OWNER-*\r\n# Install rehlds\r\necho \"Installing rehlds\"\r\nmkdir -p rehlds-install && cp -r modules\/rehlds\/3.13.0.788\/rehlds-bin-3.13.0.788_latest.zip rehlds-install\r\n\r\necho \"#########################################\"\r\n# Rehlds path\r\ncd rehlds-install\r\n\r\n# Extract rehlds\r\nunzip -q -o *.zip\r\n\r\n# Install rehlds\r\ncp -r bin\/linux32\/* ..\/server\r\n\r\n# Clean\r\ncd ..\r\nrm -rf rehlds-install\r\n# Install amxmodx\r\necho \"Installing amxmodx\"\r\nmkdir -p amxmodx-install && cp -r modules\/amxmodx\/1.10.0_latest\/amxmodx-1.10.0_latest.zip amxmodx-install\r\n\r\necho \"#########################################\"\r\n# amxmodx path\r\ncd amxmodx-install\r\n\r\n# Extract amxmodx\r\nunzip -q -o *.zip\r\n\r\n# Install amxmodx\r\ncp -r addons ..\/server\/cstrike\r\n\r\n# Clean\r\ncd ..\r\nrm -rf amxmodx-install\r\n# Install ReGameDLL_CS\r\necho \"Installing ReGameDLL_CS\"\r\nmkdir -p ReGameDLL_CS-install && cp -r modules\/ReGameDLL_CS\/5.26.0.668\/regamedll-bin-5.26.0.668_latest.zip ReGameDLL_CS-install\r\n\r\necho \"#########################################\"\r\n# ReGameDLL_CS path\r\ncd ReGameDLL_CS-install\r\n\r\n# Extract ReGameDLL_CS\r\nunzip -q -o *.zip\r\n\r\n# Install ReGameDLL_CS\r\ncp -r bin\/linux32\/* ..\/server\r\n\r\n# Clean\r\ncd ..\r\nrm -rf ReGameDLL_CS-install\r\n# Install reapi\r\necho \"Installing reapi\"\r\nmkdir -p reapi-install && cp -r modules\/reapi\/5.24.0.300\/reapi-bin-5.24.0.300_latest.zip reapi-install\r\n\r\necho \"#########################################\"\r\n# reapi path\r\ncd reapi-install\r\n\r\n# Extract reapi\r\nunzip -q -o *.zip\r\n\r\n# Install reapi\r\ncp -r addons ..\/server\/cstrike\r\n\r\n# Add the module\r\ngrep -qxF \"reapi\" ..\/server\/cstrike\/addons\/amxmodx\/configs\/modules.ini || echo \"reapi\" >> ..\/server\/cstrike\/addons\/amxmodx\/configs\/modules.ini\r\n\r\n# Clean\r\ncd ..\r\nrm -rf reapi-install\r\n# Install metamod-r\r\necho \"Installing metamod-r\"\r\nmkdir -p metamod-r-install && cp -r modules\/metamod-r\/1.3.0.149\/metamod-bin-1.3.0.149_latest.zip metamod-r-install\r\n\r\necho \"#########################################\"\r\n# metamod-r path\r\ncd metamod-r-install\r\n\r\n# Extract metamod-r\r\nunzip -q -o *.zip\r\n\r\n# Install metamod-r\r\ncp -r addons ..\/server\/cstrike\r\n\r\n# Ensure the plugins.ini file exists\r\ntouch ..\/server\/cstrike\/addons\/metamod\/plugins.ini\r\n\r\n# Add the required line if it doesn't already exist\r\ngrep -qxF \"linux addons\/amxmodx\/dlls\/amxmodx_mm_i386.so\" ..\/server\/cstrike\/addons\/metamod\/plugins.ini || echo \"linux addons\/amxmodx\/dlls\/amxmodx_mm_i386.so\" >> ..\/server\/cstrike\/addons\/metamod\/plugins.ini\r\n\r\n# Modify liblist.gam to set the new gamedll_linux line\r\nsed -i 's|^gamedll_linux.*|gamedll_linux \"addons\/metamod\/metamod_i386.so\"|' ..\/server\/cstrike\/liblist.gam || echo 'gamedll_linux \"addons\/metamod\/metamod_i386.so\"' >> ..\/server\/cstrike\/liblist.gam\r\n\r\n# Clean\r\ncd ..\r\nrm -rf metamod-r-install\r\n# Install reunion\r\necho \"Installing reunion\"\r\nmkdir -p reunion-install && cp -r modules\/reunion\/0.2.0.13\/reunion-0.2.0.13_latest.zip reunion-install\r\n\r\necho \"#########################################\"\r\n# reunion path\r\ncd reunion-install\r\n\r\n# Extract reunion\r\nunzip -q -o *.zip\r\n\r\n# Copy metamod plugin\r\nmkdir -p ..\/server\/cstrike\/addons\/metamod\/reunion\/ \r\ncp -r bin\/Linux\/* ..\/server\/cstrike\/addons\/metamod\/reunion\/\r\n\r\n# Add new line in plugins.ini metamod\r\ngrep -qxF \"linux addons\/metamod\/reunion\/reunion_mm_i386.so\" ..\/server\/cstrike\/addons\/metamod\/plugins.ini || echo \"linux addons\/metamod\/reunion\/reunion_mm_i386.so\" >> ..\/server\/cstrike\/addons\/metamod\/plugins.ini\r\n\r\n# Copy config\r\ncp -r reunion.cfg ..\/server\/cstrike\r\n\r\n# Generate a random alphanumeric string of length 50\r\nRANDOM_STRING=$(cat \/dev\/urandom | tr -dc '0-9a-zA-Z' | head -c 50)\r\n\r\n# Define the reunion.cfg file path\r\nCONFIG_FILE=\"..\/server\/cstrike\/reunion.cfg\"\r\n\r\n# Check if the file exists\r\nif [[ -f \"$CONFIG_FILE\" ]]; then\r\n # Replace the SteamIdHashSalt line with the new random string\r\n sed -i \"s\/^SteamIdHashSalt\\s*=.*\/SteamIdHashSalt = $RANDOM_STRING\/\" \"$CONFIG_FILE\"\r\n echo \"Updated SteamIdHashSalt in $CONFIG_FILE with $RANDOM_STRING\"\r\nelse\r\n echo \"$CONFIG_FILE does not exist.\"\r\nfi\r\n\r\n# Clean\r\ncd ..\r\nrm -rf reunion-install\r\n\r\n#FOOTER\r\ncd \/mnt\/server\/${REPO_OWNER}-*\r\ncp -r server\/* \/mnt\/server\r\nchmod -R 777 \/mnt\/server\r\n\r\n# Delete file if exists\r\ncd \/mnt\/server && rm -rf ${REPO_OWNER}-*\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"\r\n#FOOTER", "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } }, "variables": [ { "sort": 1, "name": "Game ID", "description": "The ID corresponding to the game to download and run using HLDS.\r\n\r\nThe HLDS server ID is 90. This should not be changed.", "env_variable": "SRCDS_APPID", "default_value": "90", "user_viewable": false, "user_editable": false, "rules": "required|numeric|in:90", "field_type": "text" }, { "sort": 2, "name": "Game Name", "description": "The name corresponding to the game to download and run using HLDS.\r\n\r\nall the HLDS server names are here - https:\/\/developer.valvesoftware.com\/wiki\/Dedicated_Server_Name_Enumeration", "env_variable": "HLDS_GAME", "default_value": "cstrike", "user_viewable": false, "user_editable": false, "rules": "required|alpha_dash|between:1,100", "field_type": "text" }, { "sort": 3, "name": "Map", "description": "The default map for the server.", "env_variable": "SRCDS_MAP", "default_value": "de_dust2", "user_viewable": true, "user_editable": true, "rules": "required|string|alpha_dash", "field_type": "text" }, { "sort": 4, "name": "VAC port", "description": "Specifies the VAC port the server should use. Default is 26900.", "env_variable": "VAC_PORT", "default_value": "26900", "user_viewable": false, "user_editable": false, "rules": "required|numeric|digits_between:1,5", "field_type": "text" }, { "sort": 5, "name": "ReHLDS Version", "description": "The version of ReHLDS to install, or 'latest' for the latest release.", "env_variable": "VERSION", "default_value": "latest", "user_viewable": false, "user_editable": false, "rules": "required|string", "field_type": "text" }, { "sort": 6, "name": "Validate", "description": "Validate game files on update. Recommended to turn off with ReHLDS due to SteamCMD overwriting its changes", "env_variable": "VALIDATE", "default_value": "0", "user_viewable": false, "user_editable": false, "rules": "required|boolean", "field_type": "text" }, { "sort": 7, "name": "Steam Username", "description": "Username associated wanted to be used. Not needed.", "env_variable": "STEAM_USER", "default_value": "", "user_viewable": false, "user_editable": false, "rules": "nullable|string", "field_type": "text" }, { "sort": 8, "name": "Steam Password", "description": "Steam Password for account.", "env_variable": "STEAM_PASS", "default_value": "", "user_viewable": false, "user_editable": false, "rules": "nullable|string", "field_type": "text" }, { "sort": 9, "name": "Steam Auth", "description": "Steam authenticator code for the account", "env_variable": "STEAM_AUTH", "default_value": "", "user_viewable": false, "user_editable": false, "rules": "nullable|string", "field_type": "text" }, { "sort": 10, "name": "Beta branch", "description": "Leave empty for the public branch, for the legacy version select steam_legacy.", "env_variable": "SRCDS_BETAID", "default_value": "steam_legacy", "user_viewable": false, "user_editable": false, "rules": "nullable|string|in:,steam_legacy", "field_type": "text" }, { "sort": 11, "name": "Auto update", "description": "Auto update on restart", "env_variable": "AUTO_UPDATE", "default_value": "0", "user_viewable": false, "user_editable": false, "rules": "required|boolean", "field_type": "text" } ] }