task | add systemd service to call check-nic every minute
This commit is contained in:
parent
46788b5c8a
commit
56bc87d3df
1 changed files with 20 additions and 0 deletions
|
|
@ -48,8 +48,28 @@ in {
|
||||||
'';
|
'';
|
||||||
serviceConfig = { Type = "oneshot"; };
|
serviceConfig = { Type = "oneshot"; };
|
||||||
};
|
};
|
||||||
|
check-nic = {
|
||||||
|
description = "Adjust tailscale MTU based on location";
|
||||||
|
unitConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
Environment =
|
||||||
|
"PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin";
|
||||||
|
ExecStart = "/home/don/bin/check-nic";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
timers = {
|
timers = {
|
||||||
|
check-nic = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
partOf = [ "check-nic.service" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "1m";
|
||||||
|
Unit = "check-nic.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
detect-reboot-for-upgrade = {
|
detect-reboot-for-upgrade = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
partOf = [ "detect-reboot-for-upgrade.service" ];
|
partOf = [ "detect-reboot-for-upgrade.service" ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue