-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add read-only config option #1988
Conversation
…read-only. It can only be modified through the config file but neither the API nor the CLI as long as read-only mode is enabled Signed-off-by: DL6ER <dl6er@dl6er.de>
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: DL6ER <dl6er@dl6er.de>
Conflicts have been resolved. |
Has been confirmed working by original requestor on Discourse |
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.
I tried it and setting this option to true
works as expected. However, setting it back to false
needs a manual FTL restart before the change applied. It seems from the logging, FTL stoppend watching the file for changes and therefor does not realize that readOnly
is now back to default false
…d-only mode Signed-off-by: DL6ER <dl6er@dl6er.de>
Thank you, this was some very good review hint! The issue was that we skipped recomputing the checksum in read-only mode and, hence, FTL did not realize that the file actually changed once you went back from |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/support-writing-to-pihole-toml-directly/70522/11 |
What does this implement/fix?
Add new
misc.readOnly
config option to force the configuration to be read-only. It can only be modified through the config file but neither the API nor the CLI as long as read-only mode is enabled.Related issue or feature (if applicable): https://discourse.pi-hole.net/t/support-writing-to-pihole-toml-directly/70522/
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.