mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #46959 from worldofpeace/emby/correct-permission
nixos/emby: ensure plugins are writeable
This commit is contained in:
commit
7ac9e75583
@ -36,11 +36,18 @@ in
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
test -d ${cfg.dataDir} || {
|
||||
if [ -d ${cfg.dataDir} ]
|
||||
then
|
||||
for plugin in ${cfg.dataDir}/plugins/*
|
||||
do
|
||||
echo "Correcting permissions of plugin: $plugin"
|
||||
chmod u+w $plugin
|
||||
done
|
||||
else
|
||||
echo "Creating initial Emby data directory in ${cfg.dataDir}"
|
||||
mkdir -p ${cfg.dataDir}
|
||||
chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}
|
||||
}
|
||||
fi
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
|
Loading…
Reference in New Issue
Block a user