Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected script termination - entrypoint-router.sh #16

Merged

Conversation

Paraphraser
Copy link
Contributor

Resolves issue raised in #15 where entrypoint-router.sh exits after
telling the pipe listener process to go away, with the result that the
temporary pipe file does not get cleaned up on a container restart.

The temporary pipe file is not persisted so it will always get cleaned
up when the container is terminated or recreated.

The pipe listener process exits automatically without needing any signal
from entrypoint-router.sh so the script lines doing that are removed.

Instead of creating the pipe file using mktemp with a random suffix,
the hard-coded name "/tmp/zerotier-ipc-log" will be used. The pipe file
is:

  • still in /tmp so it is not persisted and will get cleaned up when
    the container is terminated.

  • always initalised empty each time the script runs (important if the
    container restarts).

Fixes: #15

Signed-off-by: Phill Kelley [email protected]

Resolves issue raised in zyclonite#15 where `entrypoint-router.sh` exits after
telling the pipe listener process to go away, with the result that the
temporary pipe file does not get cleaned up on a container restart.

> The temporary pipe file is not persisted so it will always get cleaned
 up when the container is terminated or recreated.

The pipe listener process exits automatically without needing any signal
from `entrypoint-router.sh` so the script lines doing that are removed.

Instead of creating the pipe file using `mktemp` with a random suffix,
the hard-coded name "/tmp/zerotier-ipc-log" will be used. The pipe file
is:

* still in `/tmp` so it is not persisted and will get cleaned up when
 the container is terminated.

* always initalised empty each time the script runs (important if the
 container restarts).

Fixes: zyclonite#15

Signed-off-by: Phill Kelley <[email protected]>
@Paraphraser
Copy link
Contributor Author

Tested updated router-main. Works as expected on my Raspberry Pis.

@Paraphraser Paraphraser deleted the 20220803-entrypoint-router-main branch August 3, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

entrypoint-router.sh - unexpected script termination in termination_handler()
2 participants