From d1ec77dc693457bef08d2160ff7ede4c64e70a5a Mon Sep 17 00:00:00 2001 From: Pranav Jerry Date: Tue, 17 Aug 2021 09:49:16 +0530 Subject: [PATCH] clean up runtime files when stopped This only applies to the systemd service --- naxalnet.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/naxalnet.service b/naxalnet.service index 4369822..72f69b5 100644 --- a/naxalnet.service +++ b/naxalnet.service @@ -27,6 +27,9 @@ ExecStartPre=/usr/bin/sleep 2 ExecStart=/usr/bin/naxalnet # Reload systemd-networkd after naxalnet exits ExecStartPost=/usr/bin/networkctl reload +# Delete all files in /run/systemd/network +ExecStop=/usr/bin/find /run/systemd/network -type f -delete +ExecStopPost=/usr/bin/networkctl reload # Delete the interfaces created ExecStopPost=/usr/bin/networkctl delete bridge0 bat0 # Make python flush messages instead of buffering.