Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

New squad egg for wine - #2887

Open
fakhry7050 wants to merge 19 commits into
pelican-eggs:masterfrom
fakhry7050:master
Open

fakhry7050 wants to merge 19 commits into
pelican-eggs:masterfrom
fakhry7050:master

Conversation

@fakhry7050

@fakhry7050 fakhry7050 commented Apr 11, 2024 •

Copy link
Copy Markdown

Description

create wine egg for squad

Checklist for all submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you tested and reviewed your changes with confidence that everything works?
  • Did you branch your changes and PR from that branch and not from your master branch?
    • If not, why?:

Remaining Things:

Done:

  1. ✅ Unused variable "Server Executable". Link
  2. ✅ Install script still creates start.sh file and needs to be removed. Link
  3. ✅ Use the suggested startup command but needs edit to use the variables that we use:
rm /home/container/SquadGame/Saved/Logs/SquadGame.log; wine /home/container/SquadGame/Binaries/Win64/SquadGameServer.exe Port={{SERVER_PORT}} QueryPort={{QUERY_PORT}} beaconport={{BEACON_PORT}} FIXEDMAXTICKRATE={{MAX_TICK}} -log & SQD_PID=$!; tail -c0 -F /home/container/SquadGame/Saved/Logs/SquadGame.log --pid=$SQD_PID

4.✅ Needs feature: Steam disk space. Link

    "features": [
        "steam_disk_space"
    ],
  1. ✅ Use the base CMD install script as basis: steamcmd_installer.sh. Link
  • ✅ Remove startup shell script
  • ✅ Put back the vanilla egg

New egg Submissions

  1. Does your submission pass tests (server is connectable)?
  2. [] Does your egg use a custom docker image?
    • [] Have you tried to use a generic image?
    • [] Did you PR the necessary changes to make it work?
  3. [] Have you added the egg to the main README.md and any other README files in subdirectories of the egg (e.g /game_eggs) according to the alphabetical order?
  4. Have you added a unique README.md for the egg you are adding according to the alphabetical order?
  5. You verify that the start command applied does not use a shell script
    • [] If some script is needed then it is part of a current yolk or a PR to add one
  6. The egg was exported from the panel

Comment thread game_eggs/steamcmd_servers/squad/egg-squad.json
@lbzepoqo

Copy link
Copy Markdown

Just sharing it here...

Can't be PR'd here as is; cannot use sh files to handle startup. User editable startup commands are taboo
#2882 (comment)

"ghcr.io\/parkervcp\/yolks:wine_latest": "ghcr.io\/parkervcp\/yolks:wine_latest"
},
"file_denylist": [],
"startup": ".\/start.sh",

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. [ x] You verify that the start command applied does not use a shell script

Agreed but still used 😆

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed 🎉

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. [ 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. [ 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.

Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
Comment thread game_eggs/steamcmd_servers/squad/README.md
@QuintenQVD0
QuintenQVD0 marked this pull request as draft April 11, 2024 17:43
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
},
"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 \"-----------------------------------------\"",

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all think done

Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
@ImKringle

Copy link
Copy Markdown
Contributor

LGTM @fakhry7050 if you're ready for @QuintenQVD0 or another of the contributors to check over take it off a Draft PR

Comment thread game_eggs/steamcmd_servers/squad/README.md Outdated
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
Comment thread game_eggs/steamcmd_servers/squad/egg-squad-wine.json Outdated
@fakhry7050

Copy link
Copy Markdown
Author

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

@fakhry7050
fakhry7050 requested a review from QuintenQVD0 April 12, 2024 14:33
@fakhry7050
fakhry7050 marked this pull request as ready for review April 13, 2024 10:53
@fakhry7050

Copy link
Copy Markdown
Author

LGTM @fakhry7050 if you're ready for @QuintenQVD0 or another of the contributors to check over take it off a Draft PR

ITS OK HOW TAKE TIME REVIEW

@QuintenQVD0

Copy link
Copy Markdown
Collaborator

LGTM @fakhry7050 if you're ready for @QuintenQVD0 or another of the contributors to check over take it off a Draft PR

ITS OK HOW TAKE TIME REVIEW

it is on my to-do list to revieuw, please be patient. I did not forget you.

@QuintenQVD0 QuintenQVD0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@QuintenQVD0

Copy link
Copy Markdown
Collaborator

@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

@fakhry7050

Copy link
Copy Markdown
Author

@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

@QuintenQVD0

Copy link
Copy Markdown
Collaborator

@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.

@killertobyd

Copy link
Copy Markdown

grafik

Ports are set but the server does not appear in the browser, does anyone have the same problem?

@lbzepoqo

Copy link
Copy Markdown

Ports are set but the server does not appear in the browser, does anyone have the same problem?

This might be a beacon port issue, what port did you set?

@killertobyd

Copy link
Copy Markdown

grafik

this is my startup with the ports

@lbzepoqo

Copy link
Copy Markdown

grafik

this is my startup with the ports

Beacon port must be 15000+

@QuintenQVD0

Copy link
Copy Markdown
Collaborator

Please move this PR to new steamcmd repo of this organization as this one is not used anymore

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants