Need help switch off/on wifi hotspot

Hello,

is it possible that I switch off my wifi hotspot when I shutdown my dietpi automatically and switch it on after 10s when the system is booted. Is this possible and how can I achieve it?

Can you be more specific. Is the hotspot a different device?

I have a nanopi r5c with an wifi card inside. So I am talking about the same device.

And I with this wifi card I am creating the dietpi hotspot…

Than I don’t understand your question. If you switch off DietPi, you will switch off the whole device including hotspot. And if you powering up DietPi, all service will be started. Including hotspot.

pihole and the hotspot is running on the same device but I don’t need the hotspot everyday therefore I just want to reduce the power consumption/reduce the wifi signals in my area if it is unused…so I would like to switch it of the radio…

You can disable hostapd and isc-dhcp-server, so they dont start automatically anymore.
And you probably also want to control the interface manually, so you have to disable ifup@wlan0 too (I assume wlan0 is the name of the wifi cards interface):

systemctl disable hostapd isc-dhcp-server ifup@wlan0

Then you can manually start and stop them with:

systemctl start ifup@wlan0 hostapd isc-dhcp-server 

and

systemctl stop hostapd isc-dhcp-server ifup@wlan0

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.