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

Make python invocation work with bash exec #2214

Closed
wants to merge 2 commits into from

Conversation

irismessage
Copy link

@irismessage irismessage commented Apr 6, 2023

Currently, when using this egg, the "Stop" button in the panel will absolutely not work. This is because the stop button sends a SIGTERM signal to the Bash process, and the Bash process will ignore the SIGTERM without propagating it to the Python process.

By adding exec, the Bash process will be completely replaced by the Python process, so the SIGTERM will reach the Python process and it will terminate normally.

P.S. I just had a situation where the panel registered the server as completely shut down but the server was still up and running. Please fix it

Description

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?:
  • 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
  • The egg was exported from the panel

Fixes shutdown problems. Also, add some quote marks
Used @ instead of "
@irismessage
Copy link
Author

It would also be nice if the documentation had details about what signals are being sent, and to where, when I click the Stop button, but that's a matter for another repo

@parkervcp
Copy link
Collaborator

parkervcp commented Apr 6, 2023

This won't work as the entire command is wrapped in an eval as part of the image.

I have a PR for wings to make it possible to use exec but that is still in progress.

pterodactyl/wings#160

@parkervcp parkervcp closed this Apr 6, 2023
@irismessage
Copy link
Author

do you have a preffered solution in the meantime? thinking of swapping out the bash binary

@QuintenQVD0
Copy link
Collaborator

do you have a preffered solution in the meantime? thinking of swapping out the bash binary

You can always try to set the stop cmd to ^^C

@parkervcp
Copy link
Collaborator

swapping out the bash binary

Swapping out bash wont fix it as the eval is in the start script

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.

3 participants