Merge pull request #104268 from mvnetbiz/ha-allowpaths
home-assistant: add allowlist_external_dirs to systemd unit ReadWritePaths
This commit is contained in:
commit
62ef710b54
|
@ -245,7 +245,11 @@ in {
|
||||||
Group = "hass";
|
Group = "hass";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
ProtectSystem = "strict";
|
ProtectSystem = "strict";
|
||||||
ReadWritePaths = "${cfg.configDir}";
|
ReadWritePaths = let
|
||||||
|
cfgPath = [ "config" "homeassistant" "allowlist_external_dirs" ];
|
||||||
|
value = attrByPath cfgPath [] cfg;
|
||||||
|
allowPaths = if isList value then value else singleton value;
|
||||||
|
in [ "${cfg.configDir}" ] ++ allowPaths;
|
||||||
KillSignal = "SIGINT";
|
KillSignal = "SIGINT";
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
RemoveIPC = true;
|
RemoveIPC = true;
|
||||||
|
|
Loading…
Reference in New Issue