nixos/changedetection-io: fix creation of data dir (#318666)
This commit is contained in:
@@ -129,9 +129,6 @@ in
|
|||||||
services.changedetection-io = {
|
services.changedetection-io = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
preStart = ''
|
|
||||||
mkdir -p ${cfg.datastorePath}
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
@@ -153,7 +150,7 @@ in
|
|||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
tmpfiles.rules = mkIf defaultStateDir [
|
tmpfiles.rules = mkIf (!defaultStateDir) [
|
||||||
"d ${cfg.datastorePath} 0750 ${cfg.user} ${cfg.group} - -"
|
"d ${cfg.datastorePath} 0750 ${cfg.user} ${cfg.group} - -"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user