-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New squad egg for wine #2887
base: master
Are you sure you want to change the base?
New squad egg for wine #2887
Conversation
Just sharing it here...
|
"ghcr.io\/parkervcp\/yolks:wine_latest": "ghcr.io\/parkervcp\/yolks:wine_latest" | ||
}, | ||
"file_denylist": [], | ||
"startup": ".\/start.sh", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't use SH files for startup, and is not required here at all. You can tail the log through the startup command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [ x] You verify that the start command applied does not use a shell script
Agreed but still used 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [ x] You verify that the start command applied does not use a shell script
Agreed but still used 😆
no i changed but i like start,sh but its ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [ x] You verify that the start command applied does not use a shell script
Agreed but still used 😆
no i changed but i like start,sh but its ok
I understand the convenience of using a start.sh script, but I strongly recommend against it for security reasons.
- Editable shell scripts can be modified by users, potentially introducing malicious code, or breaking the server configuration unintentionally.
- Using the 'Startup Command' field directly gives us precise control over the server launch process and its permissions. This helps prevent accidental or intentional misuse.
- It's a best practice too or at least not a taboo since the server startup is designed to be manageable through a configuration fields. This ensures maintainability and consistency across servers.
- As a preference it's really okay but since this will be shared to the general public then I think this practice should be followed.
}, | ||
"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# Install the Squad server for Windows using SteamCMD\r\n.\/steamcmd.sh +@sSteamCmdForcePlatformType windows +force_install_dir \/mnt\/server +login anonymous +app_update 403240 validate +quit\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 \\\r\n$(IFS=','; for item in $WORKSHOP_ITEMS; do echo \"+workshop_download_item 393380 ${item}\"; done) \\\r\n+quit\r\n\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# Create or Download 'start.sh' in the server directory\r\necho \"Creating start.sh script in the server directory...\"\r\ncat << 'EOF' > \/mnt\/server\/start.sh\r\n#!\/bin\/bash\r\n# Startup command to run the Squad game server and tail logs.\r\n\r\n# Ensure the server executable variable is replaced correctly\r\nSERVER_EXEC=\"\/home\/container\/SquadGame\/Binaries\/Win64\/${SERVER_EXECUTABLE}\"\r\nLOG_PATH=\"\/home\/container\/SquadGame\/Saved\/Logs\/SquadGame.log\"\r\n\r\n# Output startup details\r\necho \"Starting the Squad game server...\"\r\necho \"Executable: $SERVER_EXEC\"\r\necho \"Logs will be tailed from: $LOG_PATH\"\r\nFIXEDMAXTICKRATE=\"50\"\r\nQueryPort=27165\r\n# Start the Squad server in the background\r\nwine \"$SERVER_EXEC\" Port=${SERVER_PORT} QueryPort=${QUERY_PORT} beaconport=${BEACON_PORT} FIXEDMAXTICKRATE=${FIXEDMAXTICKRATE} -log &\r\n# Create the necessary directories if they do not exist\r\nmkdir -p \/home\/container\/SquadGame\/Saved\/Logs\r\n\r\n# Create the log file if it does not exist\r\ntouch \"$LOG_PATH\"\r\n# Tail the log file\r\n\r\ntail -f \"$LOG_PATH\"\r\nEOF\r\n\r\nchmod +x \/mnt\/server\/start.sh\r\n\r\n# Inform user of installation completion\r\necho \"-----------------------------------------\"\r\necho \"Installation and script setup completed...\"\r\necho \"-----------------------------------------\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install script still creates the sh file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all think done
LGTM @fakhry7050 if you're ready for @QuintenQVD0 or another of the contributors to check over take it off a Draft PR |
all think fixed and edited how did say @QuintenQVD0 |
ITS OK HOW TAKE TIME REVIEW |
it is on my to-do list to revieuw, please be patient. I did not forget you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@fakhry7050 As you see this repo went to a new organization and soon will be read only, please move this PR to the right repo for this egg. In your case: https://github.com/pelican-eggs/steamcmd |
done |
no, you must close this one, for the new steamcmd repo and then make their a PR. |
This might be a beacon port issue, what port did you set? |
Please move this PR to new steamcmd repo of this organization as this one is not used anymore |
Description
create wine egg for squad
Checklist for all submissions
Remaining Things:
Done:
4.✅ Needs feature: Steam disk space. Link
New egg Submissions