infra: fix systemd service
This commit is contained in:
parent
b9eac3a38c
commit
1c82b2c92e
1 changed files with 13 additions and 10 deletions
|
@ -33,22 +33,25 @@ in
|
||||||
systemd.services.public-pw-reset = {
|
systemd.services.public-pw-reset = {
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "Rest Public Password";
|
description = "Rest Public Password";
|
||||||
|
script = ''
|
||||||
|
/root/fixpw.sh
|
||||||
|
'';
|
||||||
|
path = [
|
||||||
|
pkgs.curl
|
||||||
|
pkgs.bash
|
||||||
|
];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "root";
|
User = "root";
|
||||||
script = ''
|
Type = "oneshot";
|
||||||
/root/fixpw.sh
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.timers.public-pw-reset = {
|
systemd.timers.public-pw-reset = = {
|
||||||
enable = true;
|
wantedBy = [ "timers.target" ];
|
||||||
description = "Rest Public Password";
|
|
||||||
wants = [ "public-pw-reset.service" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnBootSec= "0min";
|
OnBootSec = "5m";
|
||||||
OnCalendar = "*:0/1";
|
OnUnitActiveSec = "1m";
|
||||||
|
Unit = "public-pw-reset.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue