mirror of
https://github.com/kmein/niveum
synced 2026-03-20 20:01:08 +01:00
add restart-vpn service
This commit is contained in:
@@ -282,5 +282,19 @@
|
|||||||
package = pkgs.openjdk;
|
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