mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21:07 +01:00
add restart-vpn service
This commit is contained in:
@@ -282,5 +282,19 @@
|
||||
package = pkgs.openjdk;
|
||||
};
|
||||
}
|
||||
{
|
||||
systemd.services.restart-vpn = {
|
||||
description = "Restart VPNs after suspend";
|
||||
wantedBy = [ "suspend.target" ];
|
||||
after = [ "suspend.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
set -efu
|
||||
|
||||
${pkgs.procps}/bin/pkill -HUP --exact openvpn
|
||||
${pkgs.procps}/bin/pkill -ALRM --exact tincd
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user