created script for updating dynamic dns
This commit is contained in:
parent
30fb6ac0bf
commit
bd54541220
@ -1111,6 +1111,22 @@ systemd.user.services = {
|
|||||||
ExecStart = "${jawz_tasks}/bin/tasks";
|
ExecStart = "${jawz_tasks}/bin/tasks";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"update_dns" = let jawz_update_dns = pkgs.writeScriptBin
|
||||||
|
"update_dns" (builtins.readFile ./scripts/update_dns.sh); in {
|
||||||
|
restartIfChanged = true;
|
||||||
|
description = "update DNS of my websites";
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
path = [
|
||||||
|
pkgs.curl
|
||||||
|
pkgs.bash
|
||||||
|
jawz_update_dns
|
||||||
|
];
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 30;
|
||||||
|
ExecStart = "${jawz_update_dns}/bin/update_dns";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers = {
|
systemd.user.timers = {
|
||||||
"tasks" = {
|
"tasks" = {
|
||||||
@ -1121,6 +1137,15 @@ systemd.user.timers = {
|
|||||||
OnCalendar = "*:0/10";
|
OnCalendar = "*:0/10";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"update_dns" = {
|
||||||
|
enable = true;
|
||||||
|
description = "update DNS of my websites";
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "1min";
|
||||||
|
OnUnitActiveSec = "6h";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user