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
plex: fix startup issue #25128
plex: fix startup issue #25128
Conversation
@jb55, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Forkk, @thoughtpolice and @jerith666 to be potential reviewers. |
nixos/modules/services/misc/plex.nix
Outdated
@@ -91,7 +91,7 @@ in | |||
# Copy the database skeleton files to /var/lib/plex/.skeleton | |||
# See the the Nix expression for Plex's package for more information on | |||
# why this is done. | |||
test -d "${cfg.dataDir}/.skeleton" || mkdir "${cfg.dataDir}/.skeleton" | |||
test -d "${cfg.dataDir}/.skeleton" || (mkdir "${cfg.dataDir}/.skeleton" && chown ${cfg.user}:${cfg.group} "${cfg.dataDir}/.skeleton") |
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.
The whole expression can be replaced by a single:
install --owner ${cfg.user} --group ${cfg.group} -d "${cfg.dataDir}/.skeleton"
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 think the 'install' version will reset owner/group on the ".skeleton" directory should they be changed after creation. Similar to running the chown part of the command unconditionally.
I don't remember the details of how this is used but I seem to recall not changing permissions of existing directory might be important? Dunno.
Fixes an issue with plex on startup Fixes NixOS#24090
👍 updated and rebased
|
Will Dietz <notifications@github.com> writes:
I don't remember the details of how this is used but I seem to recall not changing permissions of existing directory might be important? Dunno.
The original patch wasn't working with existing directories either when
I tried it. I had to delete the dir and then it worked.
|
Same, but that only happened by running the old version of this commit. Anyway I thought for some reason preserving existing permissions might be useful for some reason, but nevermind :). |
Fixes an issue with plex on startup
Fixes #24090
patch by: @dtzWill
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)