diff options
author | worldofpeace <worldofpeace@users.noreply.github.com> | 2018-09-20 06:35:51 -0400 |
---|---|---|
committer | worldofpeace <worldofpeace@users.noreply.github.com> | 2018-09-20 06:35:51 -0400 |
commit | a16c6d85a1291beede624cdc14833247610eb706 (patch) | |
tree | b2108b094cd1de41ac461ad9e05bc3bbdb3ef482 /nixos | |
parent | e8a35913e138c169e0a2bbcc06efadd9363b24e6 (diff) | |
download | nixlib-a16c6d85a1291beede624cdc14833247610eb706.tar nixlib-a16c6d85a1291beede624cdc14833247610eb706.tar.gz nixlib-a16c6d85a1291beede624cdc14833247610eb706.tar.bz2 nixlib-a16c6d85a1291beede624cdc14833247610eb706.tar.lz nixlib-a16c6d85a1291beede624cdc14833247610eb706.tar.xz nixlib-a16c6d85a1291beede624cdc14833247610eb706.tar.zst nixlib-a16c6d85a1291beede624cdc14833247610eb706.zip |
nixos/emby: ensure plugins are writeable
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/emby.nix | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/nixos/modules/services/misc/emby.nix b/nixos/modules/services/misc/emby.nix index 64cc9c610ac3..ff68b850cd91 100644 --- a/nixos/modules/services/misc/emby.nix +++ b/nixos/modules/services/misc/emby.nix @@ -36,11 +36,18 @@ in after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; preStart = '' - test -d ${cfg.dataDir} || { - echo "Creating initial Emby data directory in ${cfg.dataDir}" - mkdir -p ${cfg.dataDir} - chown -R ${cfg.user}:${cfg.group} ${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 = { |