#!/bin/sh /etc/rc.common
# join the saved Wi-Fi network (station mode); does nothing when no network was saved
START=15   # before netifd: the radio can only become a station before anything turns it into an AP
export PATH="$PATH:/opt/mu300/busybox-bin"

start() {
	[ -f /etc/mu300/wifi-client.conf ] || return 0
	/opt/mu300/bin/wifi-client up
}

stop() {
	# --keep: a service stop is not the user disconnecting, the next boot still joins the network
	/opt/mu300/bin/wifi-client disconnect --keep 2>/dev/null
}
