disconnect cleanup

This commit is contained in:
John Lancaster
2026-03-27 18:40:15 -05:00
parent c946a9fdf7
commit 755846e9aa
+2 -1
View File
@@ -21,9 +21,10 @@
service = "${serviceName}.service"; service = "${serviceName}.service";
in in
pkgs.writeShellScriptBin "wg-disconnect-${interface}" '' pkgs.writeShellScriptBin "wg-disconnect-${interface}" ''
STOPTIME=$(${lib.getExe' pkgs.coreutils "date"} '+%Y-%m-%d %H:%M:%S')
${systemctl} stop ${service} ${systemctl} stop ${service}
start_time=$(${systemctl} show -p ActiveEnterTimestamp ${serviceName} | cut -d= -f2) start_time=$(${systemctl} show -p ActiveEnterTimestamp ${serviceName} | cut -d= -f2)
${journalctl} -u ${service} --since "$start_time" --no-pager ${journalctl} -u ${service} --since "$STOPTIME" --no-pager
''; '';
in in
{ {