nixos/redmine: Set up runtime directory by using RuntimeDirectory option
Instead of letting systemd tmpfiles set up the runtime directory, use the option `RuntimeDirectory` from the systemd service config since the configured path stays read-writable when ProtectSystem is set to `strict`. This is equal to adding the path to ReadWritePaths. Signed-off-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
@@ -357,7 +357,6 @@ in
|
||||
"d '${cfg.stateDir}/themes' 0750 ${cfg.user} ${cfg.group} - -"
|
||||
"d '${cfg.stateDir}/tmp' 0750 ${cfg.user} ${cfg.group} - -"
|
||||
|
||||
"d /run/redmine - - - - -"
|
||||
"d /run/redmine/public - - - - -"
|
||||
"L+ /run/redmine/config - - - - ${cfg.stateDir}/config"
|
||||
"L+ /run/redmine/files - - - - ${cfg.stateDir}/files"
|
||||
@@ -456,6 +455,8 @@ in
|
||||
TimeoutSec = "300";
|
||||
WorkingDirectory = "${cfg.package}/share/redmine";
|
||||
ExecStart = "${bundle} exec rails server -u webrick -e production -b ${toString cfg.address} -p ${toString cfg.port} -P '${cfg.stateDir}/redmine.pid'";
|
||||
RuntimeDirectory = "redmine";
|
||||
RuntimeDirectoryMode = "0750";
|
||||
AmbientCapabilities = "";
|
||||
CapabilityBoundingSet = "";
|
||||
LockPersonality = true;
|
||||
|
||||
Reference in New Issue
Block a user