Merge pull request #1037 from fewtarius/dev

Fix ordering so hostname is set properly.
This commit is contained in:
fewtarius 2023-02-09 07:26:03 -05:00 committed by GitHub
commit 08b636a24d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -72,6 +72,11 @@ check_wifi() {
}
connect_wifi() {
NETCHECK=$(systemctl status connman >/dev/null 2>&1)
if [ ! "$?" = "0" ]
then
systemctl start connman
fi
STATE=$(get_wifi_state)
if [ ! "${STATE}" = "online" ]
then

View file

@ -8,6 +8,12 @@ HOSTNAME=$(get_setting system.hostname)
hostname ${HOSTNAME}
avahi-set-host-name ${HOSTNAME}
NETCHECK=$(systemctl status connman >/dev/null 2>&1)
if [ "$?" = "0" ]
then
systemctl stop connman
fi
if [ "$(get_setting wifi.enabled)" == "0" ] || [ "$1" == "disable" ]
then
nohup wifictl disable &
@ -15,3 +21,4 @@ elif [ "$(get_setting wifi.enabled)" == "1" ] || [ "$1" == "enable" ]
then
nohup wifictl enable &
fi