disconnect cleanup
This commit is contained in:
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user