added override service for wpa_supplicant

This probably isn't working like we want
This commit is contained in:
Pranav Jerry 2021-10-22 12:54:52 +05:30
parent 270db3cf90
commit 295fde3f0b
Signed by: pranav
GPG Key ID: F1DCDC4FED0A0C5B
5 changed files with 8 additions and 3 deletions

View File

@ -219,12 +219,14 @@ sudo systemctl enable naxalnet.service
Now naxalnet will start a mesh on every boot.
<!--
If you use GNOME, you should mask `wpa_supplicant.service` so that it
cannot be started by systemd. See issue #21
```sh
sudo systemctl mask wpa_supplicant.service
```
-->
If you have NetworkManager enabled, which is the default in Ubuntu and
Fedora, it should be disabled:

View File

@ -42,4 +42,4 @@ given below.
#
# In case you forgot to change the version, skip the number
# and put the next number in the next commit.
__version__ = "0.5.0a1.dev3"
__version__ = "0.5.0a1.dev4"

View File

@ -117,8 +117,6 @@ def setup_devices():
"""
try:
notify("STATUS=Setting up mesh...")
# This is a terrible hack to fix #21. See the issue for more details
time.sleep(2)
iwd = IWD()
devices = iwd.get_devices()
adhoc_devices = []

View File

@ -0,0 +1,3 @@
[Service]
# Fix for #21
ExecStartPost=systemctl try-restart naxalnet.service

View File

@ -36,6 +36,8 @@ lib/systemd/system =
service/naxalnet.service
lib/systemd/system/iwd.service.d =
service/iwd.service.d/naxalnet.conf
lib/systemd/system/wpa_supplicant.service.d =
service/wpa_supplicant.service.d/naxalnet.conf
# If installing with pip, this file will be copied to some other place.
# This is the reason we use setup.py instead of pip in the Makefile.
/etc/naxalnet =