feat: Switched db user from admin to $USER, modularized the code, and re-wo…#3
Open
cnbennett3 wants to merge 1 commit into
Open
feat: Switched db user from admin to $USER, modularized the code, and re-wo…#3cnbennett3 wants to merge 1 commit into
cnbennett3 wants to merge 1 commit into
Conversation
…rked to reuse a valid existing db if one exists.
frostyfan109
reviewed
Jun 1, 2026
Comment on lines
+48
to
+52
| # Verify that "before_delete hook" is set to expected value | ||
| if ! grep -Fq "$EXPECTED_HOOK" /tmp/filebrowser-config.json; then | ||
| echo "[init.sh::validate_db]: Invalid database: before_delete hook set to invalid value." | ||
| return 1 | ||
| fi |
There was a problem hiding this comment.
If trash-cli is disabled, I don't think the hook is ever set so this will erroneously throw
frostyfan109
reviewed
Jun 1, 2026
|
|
||
| # Add bootstrap $USER as bootstrap db user. Default perms used (ie everything except admin and password lock) | ||
| echo "[init.sh::rebuild_db]: Adding database bootstrap user [$USER]" | ||
| if ! /filebrowser -d "$DB_PATH" -c "$CONFIG_PATH" users add "$USER" create_random_password; then |
There was a problem hiding this comment.
isn't this going to pass in the literal create_random_password instead of a function call?
Author
There was a problem hiding this comment.
Yes, good catch. I accidentally nuked it when I was cleaning up the code to commit. It's back.
frostyfan109
reviewed
Jun 1, 2026
frostyfan109
left a comment
There was a problem hiding this comment.
couple things to clarify before approving
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Switched db user from admin to $USER, modularized the code, and re-worked to reuse a valid existing db if one exists.