reduced 5s delay in the systemd service to 2s

This commit is contained in:
Pranav Jerry 2021-07-26 15:58:50 +05:30
parent b3710633cc
commit 19137faab3
No known key found for this signature in database
GPG Key ID: F1DCDC4FED0A0C5B

View File

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