Bladeren bron

Do interactive app configuration before installing base system

Bob Mottram 8 jaren geleden
bovenliggende
commit
6debd6b5f5
2 gewijzigde bestanden met toevoegingen van 26 en 21 verwijderingen
  1. 1
    0
      src/freedombone-config
  2. 25
    21
      src/freedombone-utils-selector

+ 1
- 0
src/freedombone-config Bestand weergeven

@@ -1345,6 +1345,7 @@ function interactive_config {
1345 1345
     choose_static_ip
1346 1346
     choose_default_domain_name
1347 1347
     choose_email_address
1348
+    install_apps_interactive
1348 1349
 
1349 1350
     # delete the temporary configuration file
1350 1351
     if [ -f temp.cfg ]; then

+ 25
- 21
src/freedombone-utils-selector Bestand weergeven

@@ -402,32 +402,36 @@ function remove_apps {
402 402
     update_installed_apps_list
403 403
 }
404 404
 
405
+function install_apps_interactive {
406
+    echo $"Interactive installer"
407
+    app_index=0
408
+    for a in "${APPS_AVAILABLE[@]}"
409
+    do
410
+        echo -n "${a}"
411
+        if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then
412
+            echo -n $" not installed"
413
+            if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then
414
+                echo -n $" chosen"
415
+                # interactively obtain settings for this app
416
+                if [[ $(function_exists install_interactive_${a}) == "1" ]]; then
417
+                    echo -n $" interactive"
418
+                    install_interactive_${a}
419
+                fi
420
+            fi
421
+        fi
422
+        echo ""
423
+
424
+        app_index=$[app_index+1]
425
+    done
426
+    echo $"Interactive settings complete"
427
+}
428
+
405 429
 function install_apps {
406 430
     is_interactive=$1
407 431
 
408 432
     # interactive install configuration for each app
409 433
     if [ ${is_interactive} ]; then
410
-        echo $"Interactive installer"
411
-        app_index=0
412
-        for a in "${APPS_AVAILABLE[@]}"
413
-        do
414
-            echo -n "${a}"
415
-            if [[ ${APPS_INSTALLED[$app_index]} == "0" ]]; then
416
-                echo -n $" not installed"
417
-                if [[ ${APPS_CHOSEN[$app_index]} == "1" ]]; then
418
-                    echo -n $" chosen"
419
-                    # interactively obtain settings for this app
420
-                    if [[ $(function_exists install_interactive_${a}) == "1" ]]; then
421
-                        echo -n $" interactive"
422
-                        install_interactive_${a}
423
-                    fi
424
-                fi
425
-            fi
426
-            echo ""
427
-
428
-            app_index=$[app_index+1]
429
-        done
430
-        echo $"Interactive settings complete"
434
+        install_apps_interactive
431 435
     fi
432 436
 
433 437
     # now install the apps