Re-order network restart/wifi start.

This commit is contained in:
fewtarius 2023-01-03 06:42:44 -05:00
parent f24b324b17
commit ec42c8d6a6
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -8,12 +8,10 @@ HOSTNAME=$(get_setting system.hostname)
hostname ${HOSTNAME}
avahi-set-host-name ${HOSTNAME}
if [ "$(get_setting internal.wifi)" == 0 ] && [ "${DEVICE_INTERNAL_WIFI}" = true ]
NETCHECK=$(systemctl status connman >/dev/null 2>&1)
if [ "$?" = "0" ]
then
nohup rmmod ${DEVICE_WIFI_MODULE} &
exit 0
else
set_setting internal.wifi 1
systemctl restart connman
fi
if [ "$(get_setting wifi.enabled)" == "0" ] || [ "$1" == "disable" ]
@ -23,9 +21,3 @@ elif [ "$(get_setting wifi.enabled)" == "1" ] || [ "$1" == "enable" ]
then
nohup wifictl enable &
fi
NETCHECK=$(systemctl status connman >/dev/null 2>&1)
if [ "$?" = "0" ]
then
systemctl restart connman
fi