diff --git a/game_eggs/steamcmd_servers/squad/egg-squad-wine.json b/game_eggs/steamcmd_servers/squad/egg-squad-wine.json index 65b1bfa3..c4c62801 100644 --- a/game_eggs/steamcmd_servers/squad/egg-squad-wine.json +++ b/game_eggs/steamcmd_servers/squad/egg-squad-wine.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2024-04-12T14:58:16+01:00", + "exported_at": "2024-04-13T13:14:46+02:00", "name": "Squad Wine", "author": "parker@parkervcp.com", "description": "Squad is a realism-based military tactical first-person shooter video game developed and published by Canadian indie developer Offworld Industries exclusively through the Steam distribution platform. It is a spiritual successor to the Project Reality modification for Battlefield 2.", @@ -24,7 +24,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# This script installs the Squad game server using Wine and SteamCMD, as well as creates a start.sh script.\r\n\r\n# Navigate to the temporary directory and setup 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\n\r\n# Create a directory to prevent SteamCMD disk write errors\r\nmkdir -p \/mnt\/server\/steamapps\r\ncd \/mnt\/server\/steamcmd\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# Install the game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -n ${SRCDS_BETAID} ]] && printf %s \"-beta ${SRCDS_BETAID}\" ) $( [[ -n ${SRCDS_BETAPASS} ]] && printf %s \"-betapassword ${SRCDS_BETAPASS}\" ) ${INSTALL_FLAGS} validate +quit\r\n\r\n\r\n# Remove the Steam workshop file to prevent conflict with mods specified in the variables tab\r\nrm \/mnt\/server\/steamapps\/workshop\/appworkshop_393380.acf\r\n\r\n# Address ownership issues which can cause SteamCMD to fail, especially when running as root\r\nchown -R root:root \/mnt\r\n\r\n# Set the HOME environment variable to the server directory\r\nexport HOME=\/mnt\/server\r\n\r\n# Download specified workshop items using a list from the `WORKSHOP_ITEMS` environment variable\r\n.\/steamcmd.sh +@sSteamCmdForcePlatformType windows +force_install_dir \/mnt\/server +login anonymous $(IFS=','; for item in $WORKSHOP_ITEMS; do echo \"+workshop_download_item 393380 ${item}\"; done) +quit\r\n# Move downloaded mods to the appropriate directory\r\nmv -f \/mnt\/server\/steamapps\/workshop\/content\/393380\/* \/mnt\/server\/SquadGame\/Plugins\/Mods\/\r\n\r\n\r\n\r\n# Inform user of installation completion\r\necho \"-----------------------------------------\"\r\necho \"Installation and script setup completed...\"\r\necho \"-----------------------------------------\"", + "script": "#!\/bin\/bash\r\n# This script installs the Squad game server using Wine and SteamCMD, as well as creates a start.sh script.\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 # Fix steamcmd disk write error when this folder is missing\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## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s \"-beta ${SRCDS_BETAID}\" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s \"-betapassword ${SRCDS_BETAPASS}\" ) ${INSTALL_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\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\n\r\nif test -f \"\/mnt\/server\/steamapps\/workshop\/appworkshop_393380.acf\"; then\r\n # Remove the Steam workshop file to prevent conflict with mods specified in the variables tab\r\n rm \/mnt\/server\/steamapps\/workshop\/appworkshop_393380.acf\r\nfi\r\n\r\n\r\n# Address ownership issues which can cause SteamCMD to fail, especially when running as root\r\nchown -R root:root \/mnt\r\n\r\n# Set the HOME environment variable to the server directory\r\nexport HOME=\/mnt\/server\r\n\r\n# Just to be safe\r\nmkdir -p \/mnt\/server\/SquadGame\/Plugins\/Mods\/\r\n\r\n# Download specified workshop items using a list from the `WORKSHOP_ITEMS` environment variable\r\n.\/steamcmd.sh +@sSteamCmdForcePlatformType windows +force_install_dir \/mnt\/server +login anonymous $(IFS=','; for item in $WORKSHOP_ITEMS; do echo \"+workshop_download_item 393380 ${item}\"; done) +quit\r\n# Move downloaded mods to the appropriate directory\r\nmv -f \/mnt\/server\/steamapps\/workshop\/content\/393380\/* \/mnt\/server\/SquadGame\/Plugins\/Mods\/\r\n\r\n\r\n\r\n# Inform user of installation completion\r\necho \"-----------------------------------------\"\r\necho \"Installation and script setup completed...\"\r\necho \"-----------------------------------------\"", "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } @@ -162,19 +162,19 @@ }, { "name": "WINDOWS INSTALL", - "description": "Set specific SteamCMD platform type\r\n1 For WIndows\r\n2 For linux", + "description": "", "env_variable": "WINDOWS_INSTALL", "default_value": "1", - "user_viewable": true, - "user_editable": true, - "rules": "required|numeric|max:1", + "user_viewable": false, + "user_editable": false, + "rules": "required|numeric|in:1", "field_type": "text" }, { "name": "STEAM USER", "description": "Specify Steam User or leave it Blank for anonymous", "env_variable": "STEAM_USER", - "default_value": "anonymous", + "default_value": "", "user_viewable": true, "user_editable": true, "rules": "nullable|string", @@ -187,7 +187,7 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "nullable", + "rules": "nullable|string", "field_type": "text" }, { @@ -207,7 +207,7 @@ "default_value": "403240", "user_viewable": false, "user_editable": false, - "rules": "required|string|max:20", + "rules": "required|string|in:403240", "field_type": "text" }, { @@ -215,8 +215,8 @@ "description": "Beta branch of a steam app. Leave blank to install normal branch", "env_variable": "SRCDS_BETAID", "default_value": "", - "user_viewable": true, - "user_editable": true, + "user_viewable": false, + "user_editable": false, "rules": "nullable|string", "field_type": "text" }, @@ -237,8 +237,8 @@ "default_value": "", "user_viewable": false, "user_editable": false, - "rules": "max:30", + "rules": "nullable|string|max:30", "field_type": "text" } ] -} +} \ No newline at end of file