1
0
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:
Kierán Meinhardt
2019-08-22 09:44:21 +02:00
parent 9550f1b1a0
commit 57c0187386

View File

@@ -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
'';
};
}
];
}