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

Changing the order of checks in entrypoint 10 #939

Open
aqeelat opened this issue Oct 17, 2024 · 0 comments
Open

Changing the order of checks in entrypoint 10 #939

aqeelat opened this issue Oct 17, 2024 · 0 comments

Comments

@aqeelat
Copy link

aqeelat commented Oct 17, 2024

Wouldn't flipping these lines make more sense?
If ipv6 is enabled then we wouldn't need to check if the file is writable. The exit message will be more informative, instead of sending the user in a wild hunt.

# check if the file can be modified, e.g. not on a r/o filesystem
touch /$DEFAULT_CONF_FILE 2>/dev/null || { entrypoint_log "$ME: info: can not modify /$DEFAULT_CONF_FILE (read-only file system?)"; exit 0; }
# check if the file is already modified, e.g. on a container restart
grep -q "listen \[::]\:80;" /$DEFAULT_CONF_FILE && { entrypoint_log "$ME: info: IPv6 listen already enabled"; exit 0; }

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

No branches or pull requests

1 participant