Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Networking and servers • service configuration

$
0
0
In another thread I have been asking about starting a hotspot at boot and have been having no success at all. So I am trying to set it up as a systemd service.
This is the configuration I have set up:

Code:

[Unit]Description=MyServiceAfter=network.targetAfter=multi-user.target[Service]Type=dbusExecStart=/usr/bin/bash /home/extender/startwlan.sh[Install]WantedBy=multi-user.targetWants=network-online.target
Then I ran:

Code:

sudo systemctl enable mytest.service
It doesn't work though.

Code:

nmcli -g all
gives this output:

Code:

 bridge0: connected to Bridge"bridge0"bridge, E4:5F:01:0E:FF:F4, sw, mtu 1500ip4 defaultinet4 192.168.1.187/24route4 192.168.1.0/24 metric 425route4 default via 192.168.1.1 metric 425inet6 fe80::a89b:8dcb:558f:17d/64route6 fe80::/64 metric 1024lo: connected (externally) to lo"lo"loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536inet4 127.0.0.1/8inet6 ::1/128eth0: connected to Ethernet"eth0"ethernet (bcmgenet), E4:5F:01:0E:FF:F4, hw, mtu 1500master bridge0wlan0: disconnected"Broadcom BCM43438 combo and Bluetooth Low Energy"1 connection availablewifi (brcmfmac), E4:5F:01:0E:FF:F5, hw, mtu 1500p2p-dev-wlan0: disconnected"p2p-dev-wlan0"wifi-p2p, hwDNS configuration:servers: 192.168.1.1interface: bridge0
startwlan is:

Code:

#!/usr/bin/bashsudo /usr/bin/nmcli connection up Hotspot &
If I ssh into the Pi and run it the Hotspot comes up with the following:

Code:

bridge0: connected to Bridge"bridge0"bridge, E4:5F:01:0E:FF:F4, sw, mtu 1500ip4 defaultinet4 192.168.1.187/24route4 192.168.1.0/24 metric 425route4 default via 192.168.1.1 metric 425inet6 fe80::a89b:8dcb:558f:17d/64route6 fe80::/64 metric 1024lo: connected (externally) to lo"lo"loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536inet4 127.0.0.1/8inet6 ::1/128eth0: connected to Ethernet"eth0"ethernet (bcmgenet), E4:5F:01:0E:FF:F4, hw, mtu 1500master bridge0wlan0: connected to Hotspot"Broadcom BCM43438 combo and Bluetooth Low Energy"wifi (brcmfmac), E4:5F:01:0E:FF:F5, hw, mtu 1500master bridge0p2p-dev-wlan0: disconnected"p2p-dev-wlan0"wifi-p2p, hwDNS configuration:servers: 192.168.1.1interface: bridge0
This is the first time I have tried to set up a service

Statistics: Posted by buteman — Wed Jan 22, 2025 11:49 am



Viewing all articles
Browse latest Browse all 8609

Trending Articles