clean up runtime files when stopped

This only applies to the systemd service
This commit is contained in:
Pranav Jerry 2021-08-17 09:49:16 +05:30
parent cf54edf9b9
commit d1ec77dc69
No known key found for this signature in database
GPG Key ID: F1DCDC4FED0A0C5B

View File

@ -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.