distribution/packages/jelos/sources/autostart/common/009-wifi

23 lines
531 B
Text
Raw Normal View History

2022-03-28 23:53:26 +00:00
#!/bin/bash
2022-02-05 14:23:32 +00:00
# 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
2022-02-05 14:23:32 +00:00
if [ "$(get_setting wifi.enabled)" == "0" ] || [ "$1" == "disable" ]
then
nohup connmanctl disable wifi &
2022-02-05 14:23:32 +00:00
elif [ "$(get_setting wifi.enabled)" == "1" ] || [ "$1" == "enable" ]
then
nohup connmanctl enable wifi &
2022-02-05 14:23:32 +00:00
fi