#!/bin/bash # SPDX-License-Identifier: Apache-2.0 # Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) . /etc/profile if [ "$(get_setting internal.wifi)" == 0 ] && [ "${DEVICE_INTERNAL_WIFI}" = true ] then nohup rmmod ${DEVICE_WIFI_MODULE} & exit 0 else set_setting internal.wifi 1 fi if [ "$(get_setting wifi.enabled)" == "0" ] || [ "$1" == "disable" ] then nohup wifictl disable & elif [ "$(get_setting wifi.enabled)" == "1" ] || [ "$1" == "enable" ] then nohup wifictl enable & fi