infra: auto reset password of public user
This commit is contained in:
parent
184a43c3df
commit
45210bc514
1 changed files with 22 additions and 0 deletions
|
@ -30,6 +30,28 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.public-pw-reset = {
|
||||||
|
enable = true;
|
||||||
|
description = "Rest Public Password";
|
||||||
|
serviceConfig = {
|
||||||
|
User = "root";
|
||||||
|
script = ''
|
||||||
|
/root/fixpw.sh
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.timers..public-pw-reset = {
|
||||||
|
enable = true;
|
||||||
|
description = "Rest Public Password";
|
||||||
|
wants = [ "public-pw-reset.services" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec= "0min";
|
||||||
|
OnCalendar = "*:0/1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ensureDatabases = [ user ];
|
ensureDatabases = [ user ];
|
||||||
|
|
Loading…
Reference in a new issue