diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel
index f2b5116bcfbe5f1ab6a9001a8c509297c80d84ff..630ff8600c1d890962290609cc0491887a31da53 100755
--- a/src/freedombone-controlpanel
+++ b/src/freedombone-controlpanel
@@ -1203,12 +1203,6 @@ function change_system_name {
 }
 
 function set_dynamic_IP {
-    NETWORK_IS_STATIC=0
-    read_config_param "NETWORK_IS_STATIC"
-    if [ ${NETWORK_IS_STATIC} -eq 0 ]; then
-        return
-    fi
-
     revert_to_dynamic=
     dialog --title $"Return to using a dynamic IP address" \
            --backtitle $"Freedombone Control Panel" \
@@ -1293,8 +1287,22 @@ Enter a static local IP address for this system.\n\nIt will typically be ${IPv4_
 
             email_change_relay "$NEW_STATIC_IP"
 
-            if [[ $(config_param_exists "WIFI_INTERFACE") == "0" ]]; then
+            static_wifi_address=
+            if [[ $(config_param_exists "WIFI_INTERFACE") == "1" ]]; then
+                dialog --title $"Static local IP address" \
+                       --backtitle $"Freedombone Control Panel" \
+                       --yesno $"\nSet a static address for the wifi adapter?\n\nIf you select 'no' then wired ethernet will be used." 10 60
+                sel=$?
+                case $sel in
+                    0) static_wifi_address=1
+                       write_config_param "NETWORK_IS_STATIC" "1"
+                       ;;
+                esac
+            fi
+
+            if [ ! $static_wifi_address ]; then
                 # wired network
+                remove_wifi_startup_script
                 echo '# This file describes the network interfaces available on your system' > /etc/network/interfaces
                 echo '# and how to activate them. For more information, see interfaces(5).' >> /etc/network/interfaces
                 echo '' >> /etc/network/interfaces
@@ -1330,6 +1338,9 @@ Enter a static local IP address for this system.\n\nIt will typically be ${IPv4_
                 echo '#    netmask 255.255.255.0' >> /etc/network/interfaces
                 echo '#    network 192.168.7.0' >> /etc/network/interfaces
                 echo '#    gateway 192.168.7.1' >> /etc/network/interfaces
+            else
+                # wifi network
+                wifi_settings
             fi
 
             clear
diff --git a/src/freedombone-utils-wifi b/src/freedombone-utils-wifi
index 36975a6db2a7230344fb616f4780009f8c86f0b3..c1f697b07012f1726a5c996cbfc17d1f3d0998f0 100755
--- a/src/freedombone-utils-wifi
+++ b/src/freedombone-utils-wifi
@@ -573,6 +573,19 @@ function count_wlan {
     echo $ctr
 }
 
+function remove_wifi_startup_script {
+    remove_config_param "WIFI_INTERFACE"
+    systemd_file=/etc/systemd/system/wifistart.service
+    if [ -f $systemd_file ]; then
+        systemctl stop wifistart
+        systemctl disable wifistart
+        rm $systemd_file
+    fi
+    if [ -f $HOME/${PROJECT_NAME}-wifi.cfg ]; then
+        rm $HOME/${PROJECT_NAME}-wifi.cfg
+    fi
+}
+
 function create_wifi_startup_script {
     systemd_file=/etc/systemd/system/wifistart.service
     echo '[Unit]' > $systemd_file