certspotter: switch to using StateDirectory
This commit is contained in:
parent
8948db4dac
commit
891fa83f01
|
@ -229,7 +229,7 @@ in {
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
federation.ENABLED = true;
|
federation.ENABLED = true;
|
||||||
git.timeout = {
|
"git.timeout" = {
|
||||||
DEFAULT = 6000;
|
DEFAULT = 6000;
|
||||||
MIGRATE = 6000;
|
MIGRATE = 6000;
|
||||||
MIRROR = 6000;
|
MIRROR = 6000;
|
||||||
|
|
|
@ -100,13 +100,16 @@ in {
|
||||||
name = "hook${toString i}";
|
name = "hook${toString i}";
|
||||||
}) cfg.hooks);
|
}) cfg.hooks);
|
||||||
});
|
});
|
||||||
environment.CERTSPOTTER_STATE_DIR = "/var/lib/certspotter";
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "certspotter";
|
User = "certspotter";
|
||||||
Group = "certspotter";
|
Group = "certspotter";
|
||||||
WorkingDirectory = "/var/lib/certspotter";
|
StateDirectory = "certspotter";
|
||||||
ExecStart = "${pkgs.certspotter}/bin/certspotter -sendmail ${cfg.sendmailPath} ${lib.escapeShellArgs cfg.extraFlags}";
|
|
||||||
};
|
};
|
||||||
|
script = ''
|
||||||
|
export CERTSPOTTER_STATE_DIR="$STATE_DIR"
|
||||||
|
cd "$CERTSPOTTER_STATE_DIR"
|
||||||
|
${pkgs.certspotter}/bin/certspotter -sendmail ${cfg.sendmailPath} ${lib.escapeShellArgs cfg.extraFlags}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue