mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-01-21 13:37:25 +01:00
MycroftOS: Auto start wifi-connect at boot if no active wifi is present.
This commit is contained in:
parent
d8863e861f
commit
1dffc1df50
10
buildroot-external/package/wifi-connect/start-wifi-connect
Executable file
10
buildroot-external/package/wifi-connect/start-wifi-connect
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
iwgetid -r
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
printf 'Skipping WiFi Connect\n'
|
||||
else
|
||||
printf 'Starting WiFi Connect\n'
|
||||
/usr/local/sbin/wifi-connect
|
||||
fi
|
@ -33,8 +33,10 @@ define WIFI_CONNECT_INSTALL_TARGET_CMDS
|
||||
endef
|
||||
|
||||
define WIFI_CONNECT_INSTALL_INIT_SYSTEMD
|
||||
# $(INSTALL) -D -m 0644 $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/wifi-connect/wifi-connect.service \
|
||||
# $(TARGET_DIR)/usr/lib/systemd/system/wifi-connect.service
|
||||
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/wifi-connect/wifi-connect.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/wifi-connect.service
|
||||
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/wifi-connect/start-wifi-connect \
|
||||
$(TARGET_DIR)/usr/local/sbin/start-wifi-connect
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
11
buildroot-external/package/wifi-connect/wifi-connect.service
Normal file
11
buildroot-external/package/wifi-connect/wifi-connect.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Mycroft wifi connect service
|
||||
After=NetworkManager.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/sbin/start-wifi-connect
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -8,6 +8,7 @@ enable pulseaudio.service
|
||||
enable avahi-daemon.service
|
||||
enable seeed-voicecard.service
|
||||
enable NetworkManager.service
|
||||
enable wifi-connect.service
|
||||
|
||||
enable mycroft-splash-start.service
|
||||
enable mycroft-splash-40.service
|
||||
|
Loading…
Reference in New Issue
Block a user