From 19137faab3ecc85f68a945d05c4a4fb85020537b Mon Sep 17 00:00:00 2001 From: Pranav Jerry Date: Mon, 26 Jul 2021 15:58:50 +0530 Subject: [PATCH] reduced 5s delay in the systemd service to 2s --- naxalnet.service | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/naxalnet.service b/naxalnet.service index 1f7880f..4be1806 100644 --- a/naxalnet.service +++ b/naxalnet.service @@ -1,11 +1,15 @@ +# naxalnet systemd service +# See man:systemd.service(5) and man:systemd.unit(5) +# before editing this file. [Unit] Description=Naxalnet Requires=systemd-networkd.service Requires=iwd.service Wants=systemd-resolved.service +# naxalnet does not reload networkd, so networkd +# should be started only afer naxalnet exits Before=systemd-networkd.service After=iwd.service - # Stops NetworkManager and wpa_supplicant if already running Conflicts=NetworkManager.service Conflicts=wpa_supplicant.service @@ -16,11 +20,12 @@ After=wpa_supplicant.service Type=oneshot RemainAfterExit=yes Restart=on-failure -RestartSec=5sec +# Probably not needed now +RestartSec=2sec # IWD takes some time to find devices. -# Without the sleep 5, naxalnet could not detect the second +# Without the delay, naxalnet could not detect the second # device while testing. -ExecStartPre=/usr/bin/sleep 5 +ExecStartPre=/usr/bin/sleep 2 ExecStart=/usr/bin/naxalnet [Install]