Quellcode durchsuchen

app specific settings on control panel moved to an applications menu

Bob Mottram vor 8 Jahren
Ursprung
Commit
23e8e6f8f4

+ 4
- 0
src/freedombone-app-babel Datei anzeigen

@@ -33,6 +33,10 @@ VARIANTS=''
33 33
 ENABLE_BABEL="no"
34 34
 BABEL_PORT=6696
35 35
 
36
+function configure_interactive_babel {
37
+    echo -n ''
38
+}
39
+
36 40
 function install_interactive_babel {
37 41
     echo -n ''
38 42
 }

+ 4
- 0
src/freedombone-app-batman Datei anzeigen

@@ -33,6 +33,10 @@ VARIANTS=''
33 33
 ENABLE_BATMAN="no"
34 34
 BATMAN_CELLID='any'
35 35
 
36
+function configure_interactive_batman {
37
+    echo -n ''
38
+}
39
+
36 40
 function install_interactive_batman {
37 41
     echo -n ''
38 42
 }

+ 22
- 0
src/freedombone-app-blog Datei anzeigen

@@ -38,6 +38,28 @@ FULLBLOG_COMMIT='bf5fe9486160be4da86d8987d3e5c977e1dc6d32'
38 38
 MY_BLOG_TITLE="My Blog"
39 39
 MY_BLOG_SUBTITLE="Another ${PROJECT_NAME} Blog"
40 40
 
41
+function configure_interactive_blog {
42
+    data=$(tempfile 2>/dev/null)
43
+    trap "rm -f $data" 0 1 2 5 15
44
+    dialog --title $"Change blog avatar" \
45
+           --backtitle $"Freedombone Control Panel" \
46
+           --inputbox $"Enter a URL for an image. It should be approximately a square image." 8 75 2>$data
47
+    sel=$?
48
+    case $sel in
49
+        0)
50
+            IMAGE_URL=$(<$data)
51
+            if [ ${#IMAGE_URL} -gt 5 ]; then
52
+                clear
53
+                ${PROJECT_NAME}-blog -a $IMAGE_URL
54
+                if [ "$?" = "0" ]; then
55
+                    dialog --title $"Change blog avatar" \
56
+                           --msgbox $"Your blog avatar has been changed" 6 40
57
+                fi
58
+            fi
59
+            ;;
60
+    esac
61
+}
62
+
41 63
 function install_interactive_blog {
42 64
     echo -n ''
43 65
 }

+ 4
- 0
src/freedombone-app-blogstatic Datei anzeigen

@@ -35,6 +35,10 @@ PELICAN_THEMES_REPO="https://github.com/getpelican/pelican-themes"
35 35
 PELICAN_PLUGINS_REPO="https://github.com/getpelican/pelican-plugins"
36 36
 DEFAULT_BLOG_TITLE=$"Freedombone Blog"
37 37
 
38
+function configure_interactive_blogstatic {
39
+    echo -n ''
40
+}
41
+
38 42
 function install_interactive_blogstatic {
39 43
     echo -n ''
40 44
 }

+ 4
- 0
src/freedombone-app-cjdns Datei anzeigen

@@ -41,6 +41,10 @@ CJDNS_COMMIT='13189fde111d0500427a7a0ce06a970753527bca'
41 41
 CJDCMD_REPO="https://github.com/inhies/cjdcmd"
42 42
 CJDCMD_COMMIT='973cca6ed0eecf9041c3403a40193c0b1291b808'
43 43
 
44
+function configure_interactive_cjdns {
45
+    echo -n ''
46
+}
47
+
44 48
 function install_interactive_cjdns {
45 49
     echo -n ''
46 50
 }

+ 25
- 0
src/freedombone-app-dlna Datei anzeigen

@@ -30,6 +30,31 @@
30 30
 
31 31
 VARIANTS='full media'
32 32
 
33
+function configure_interactive_dlna {
34
+    while true
35
+    do
36
+        data=$(tempfile 2>/dev/null)
37
+        trap "rm -f $data" 0 1 2 5 15
38
+        dialog --backtitle $"Freedombone Control Panel" \
39
+               --title $"Media Menu" \
40
+               --radiolist $"Choose an operation:" 13 70 3 \
41
+               1 $"Attach a drive containing playable media" off \
42
+               2 $"Remove a drive containing playable media" off \
43
+               3 $"Exit" on 2> $data
44
+        sel=$?
45
+        case $sel in
46
+            1) break;;
47
+            255) break;;
48
+        esac
49
+        case $(cat $data) in
50
+            1) remove-music
51
+               attach-music;;
52
+            2) remove-music;;
53
+            3) break;;
54
+        esac
55
+    done
56
+}
57
+
33 58
 function install_interactive_dlna {
34 59
     echo -n ''
35 60
 }

+ 4
- 0
src/freedombone-app-emacs Datei anzeigen

@@ -30,6 +30,10 @@
30 30
 
31 31
 VARIANTS='all'
32 32
 
33
+function configure_interactive_emacs {
34
+    echo -n ''
35
+}
36
+
33 37
 function install_interactive_emacs {
34 38
     echo -n ''
35 39
 }

+ 4
- 0
src/freedombone-app-gnusocial Datei anzeigen

@@ -53,6 +53,10 @@ SHARINGS_THEME_COMMIT='7106c7ef03'
53 53
 GNUSOCIAL_NSFW_REPO="https://gitgud.io/ShitposterClub/SensitiveContent"
54 54
 GNUSOCIAL_NSFW_COMMIT='a096bbe0cfae9a9b177682920ffb58d32a48e136'
55 55
 
56
+function configure_interactive_gnusocial {
57
+    echo -n ''
58
+}
59
+
56 60
 function install_interactive_gnusocial {
57 61
     echo -n ''
58 62
 }

+ 4
- 0
src/freedombone-app-gogs Datei anzeigen

@@ -39,6 +39,10 @@ GIT_ONION_PORT=8090
39 39
 GIT_ADMIN_PASSWORD=
40 40
 GOGS_BIN=
41 41
 
42
+function configure_interactive_gogs {
43
+    echo -n ''
44
+}
45
+
42 46
 function install_interactive_gogs {
43 47
     echo -n ''
44 48
 }

+ 85
- 0
src/freedombone-app-hubzilla Datei anzeigen

@@ -40,6 +40,91 @@ HUBZILLA_ADMIN_PASSWORD=
40 40
 HUBZILLA_COMMIT='8aee932525d0bc341713fe7052e2a5ab318a69c0'
41 41
 HUBZILLA_ADDONS_COMMIT='4456f097e3faf2adeab696ad08e3f213e82199bd'
42 42
 
43
+function hubzilla_renew_cert {
44
+    dialog --title $"Renew SSL certificate" \
45
+           --backtitle $"Freedombone Control Panel" \
46
+           --yesno $"\nThis will renew a letsencrypt certificate. Select 'yes' to continue" 16 60
47
+    sel=$?
48
+    case $sel in
49
+        1) return;;
50
+        255) return;;
51
+    esac
52
+    HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
53
+    if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
54
+        dialog --title $"Renew SSL certificate" \
55
+               --msgbox $"Hubzilla install directory not found" 6 40
56
+        return
57
+    fi
58
+    ${PROJECT_NAME}-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
59
+    if [ ! "$?" = "0" ]; then
60
+        any_key
61
+    else
62
+        dialog --title $"Renew SSL certificate" \
63
+               --msgbox $"Hubzilla certificate has been renewed" 6 40
64
+    fi
65
+}
66
+
67
+function hubzilla_channel_directory_server {
68
+    if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
69
+        dialog --title $"Hubzilla channel directory server" \
70
+               --msgbox $"Hubzilla is not installed on this system" 6 40
71
+        return
72
+    fi
73
+    HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
74
+    if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
75
+        dialog --title $"Hubzilla channel directory server" \
76
+               --msgbox $"Hubzilla install directory not found" 6 40
77
+        return
78
+    fi
79
+
80
+    data=$(tempfile 2>/dev/null)
81
+    trap "rm -f $data" 0 1 2 5 15
82
+    dialog --title $"Hubzilla channel directory server" \
83
+           --backtitle $"Freedombone Control Panel" \
84
+           --inputbox $"When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
85
+    sel=$?
86
+    case $sel in
87
+        0)
88
+            hubzilla_domain_server=$(<$data)
89
+            if [[ $hubzilla_domain_server != *"."* ]]; then
90
+                return
91
+            fi
92
+            if [[ $hubzilla_domain_server != "https"* ]]; then
93
+                dialog --title $"Hubzilla channel directory server" \
94
+                       --msgbox $"Invalid domain - include the https://" 6 40
95
+                return
96
+            fi
97
+            ./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
98
+            dialog --title $"Hubzilla channel directory server" \
99
+                   --msgbox $"Domain channel directory server changed to $hubzilla_domain_server" 6 40
100
+            ;;
101
+    esac
102
+}
103
+
104
+function configure_interactive_hubzilla {
105
+    while true
106
+    do
107
+        data=$(tempfile 2>/dev/null)
108
+        trap "rm -f $data" 0 1 2 5 15
109
+        dialog --backtitle $"Freedombone Control Panel" \
110
+               --title $"Hubzilla" \
111
+               --radiolist $"Choose an operation:" 13 70 4 \
112
+               1 $"Set channel directory server" off \
113
+               2 $"Renew SSL certificate" off \
114
+               3 $"Back to main menu" on 2> $data
115
+        sel=$?
116
+        case $sel in
117
+            1) break;;
118
+            255) break;;
119
+        esac
120
+        case $(cat $data) in
121
+            1) hubzilla_channel_directory_server;;
122
+            2) hubzilla_renew_cert;;
123
+            3) break;;
124
+        esac
125
+    done
126
+}
127
+
43 128
 function install_interactive_hubzilla {
44 129
     echo -n ''
45 130
 }

+ 4
- 0
src/freedombone-app-ipfs Datei anzeigen

@@ -41,6 +41,10 @@ IPFS_JS_RONIN_VERSION='0.3.11'
41 41
 IPFS_KEY_LENGTH=2048
42 42
 IPFS_GO_VERSION=0.4.2
43 43
 
44
+function configure_interactive_ipfs {
45
+    echo -n ''
46
+}
47
+
44 48
 function install_interactive_ipfs {
45 49
     echo -n ''
46 50
 }

+ 68
- 0
src/freedombone-app-irc Datei anzeigen

@@ -36,6 +36,74 @@ IRC_ONION_PORT=6697
36 36
 # An optional password to log into IRC. This applies to all users
37 37
 IRC_PASSWORD=
38 38
 
39
+function irc_show_password {
40
+    IRC_PASSWORD=$(cat /etc/ngircd/ngircd.conf | grep "Password =" | head -n 1 | awk -F '=' '{print $2}')
41
+    dialog --title $"IRC Password" \
42
+           --msgbox "$IRC_PASSWORD" 6 40
43
+}
44
+
45
+function irc_set_global_password {
46
+    dialog --title $"IRC Password" \
47
+           --clear \
48
+           --backtitle $"Freedombone Control Panel" \
49
+           --passwordbox $"Password for all IRC users, or press Enter for no password" 10 50 2> $data
50
+    sel=$?
51
+    case $sel in
52
+        0)
53
+            EXISTING_IRC_PASSWORD=$(cat /etc/ngircd/ngircd.conf | grep "Password =" | head -n 1 | awk -F '=' '{print $2}')
54
+            NEW_IRC_PASSWORD=$(<$data)
55
+            sed -i "0,/RE/s/Password =.*/Password =$NEW_IRC_PASSWORD/" /etc/ngircd/ngircd.conf
56
+
57
+            # replace the password for all users
58
+            for d in /home/*/ ; do
59
+                IRC_USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
60
+                if [[ $IRC_USERNAME != "git" && $IRC_USERNAME != "mirrors" && $IRC_USERNAME != "sync" && $IRC_USERNAME != "tahoelafs" ]]; then
61
+                    if [ -f /home/$IRC_USERNAME/.irssi/config ]; then
62
+                        sed -i "s|$EXISTING_IRC_PASSWORD|$NEW_IRC_PASSWORD|g" /home/$IRC_USERNAME/.irssi/config
63
+                        chown -R $IRC_USERNAME:$IRC_USERNAME /home/$IRC_USERNAME/.irssi
64
+                    fi
65
+                fi
66
+            done
67
+
68
+            # restart the daemon for the new password to take effect
69
+            systemctl restart ngircd
70
+
71
+            dialog --title $"IRC Password" \
72
+                   --msgbox $"The IRC password was changed" 6 40
73
+            ;;
74
+    esac
75
+}
76
+
77
+function configure_interactive_irc {
78
+    if [ ! -d /etc/ngircd ]; then
79
+        dialog --title $"IRC Menu" \
80
+               --msgbox $"No IRC server is installed" 6 70
81
+        return
82
+    fi
83
+
84
+    while true
85
+    do
86
+        data=$(tempfile 2>/dev/null)
87
+        trap "rm -f $data" 0 1 2 5 15
88
+        dialog --backtitle $"Freedombone Control Panel" \
89
+               --title $"IRC Menu" \
90
+               --radiolist $"Choose an operation:" 14 70 4 \
91
+               1 $"Set a password for all IRC users" off \
92
+               2 $"Show current IRC login password" off \
93
+               3 $"Exit" on 2> $data
94
+        sel=$?
95
+        case $sel in
96
+            1) break;;
97
+            255) break;;
98
+        esac
99
+        case $(cat $data) in
100
+            1) irc_set_global_password;;
101
+            2) irc_show_password;;
102
+            3) break;;
103
+        esac
104
+    done
105
+}
106
+
39 107
 function install_interactive_irc {
40 108
     echo -n ''
41 109
 }

+ 4
- 0
src/freedombone-app-librevault Datei anzeigen

@@ -37,6 +37,10 @@ LIBREVAULT_REPO="https://github.com/Librevault/librevault"
37 37
 LIBREVAULT_COMMIT='86a6aefcb5cc458f4d42195368fbcff2871f98e3'
38 38
 LIBREVAULT_PORT=42345
39 39
 
40
+function configure_interactive_librevault {
41
+    echo -n ''
42
+}
43
+
40 44
 function install_interactive_librevault {
41 45
     echo -n ''
42 46
 }

+ 4
- 0
src/freedombone-app-mediagoblin Datei anzeigen

@@ -37,6 +37,10 @@ MEDIAGOBLIN_COMMIT='d1ac2d52fd8859c3f32fa38e4836ffe9615e5bba'
37 37
 MEDIAGOBLIN_ADMIN_PASSWORD=
38 38
 MEDIAGOBLIN_ONION_PORT=8096
39 39
 
40
+function configure_interactive_mediagoblin {
41
+    echo -n ''
42
+}
43
+
40 44
 function install_interactive_mediagoblin {
41 45
     echo -n ''
42 46
 }

+ 4
- 0
src/freedombone-app-mumble Datei anzeigen

@@ -39,6 +39,10 @@ VOIP_PORT=64738
39 39
 VOIP_DATABASE="mumble-server.sqlite"
40 40
 VOIP_CONFIG_FILE="mumble-server.ini"
41 41
 
42
+function configure_interactive_mumble {
43
+    echo -n ''
44
+}
45
+
42 46
 function install_interactive_mumble {
43 47
     echo -n ''
44 48
 }

+ 4
- 0
src/freedombone-app-rss Datei anzeigen

@@ -42,6 +42,10 @@ RSS_READER_PATH=/etc/share/tt-rss
42 42
 RSS_READER_GNUSOCIAL_REPO="https://github.com/bashrc/ttrss-gnusocial"
43 43
 RSS_READER_GNUSOCIAL_COMMIT='20b2535e3f2b0ddc0117b584bdcaa6bf7a2d9fa2'
44 44
 
45
+function configure_interactive_rss {
46
+    echo -n ''
47
+}
48
+
45 49
 function install_interactive_rss {
46 50
     echo -n ''
47 51
 }

+ 4
- 0
src/freedombone-app-searx Datei anzeigen

@@ -38,6 +38,10 @@ SEARX_ONION_HOSTNAME=
38 38
 SEARX_LOGIN_TEXT=$"Search engine login"
39 39
 SEARX_PASSWORD=
40 40
 
41
+function configure_interactive_searx {
42
+    echo -n ''
43
+}
44
+
41 45
 function install_interactive_searx {
42 46
     echo -n ''
43 47
 }

+ 4
- 0
src/freedombone-app-sip Datei anzeigen

@@ -37,6 +37,10 @@ VOIP_TURN_PORT=3478
37 37
 VOIP_TURN_TLS_PORT=5349
38 38
 VOIP_TURN_NONCE=
39 39
 
40
+function configure_interactive_sip {
41
+    echo -n ''
42
+}
43
+
40 44
 function install_interactive_sip {
41 45
     echo -n ''
42 46
 }

+ 4
- 0
src/freedombone-app-syncthing Datei anzeigen

@@ -39,6 +39,10 @@ SYNCTHING_PORT=22000
39 39
 SYNCTHING_SHARED_DATA=/var/lib/syncthing/SyncShared
40 40
 SYNCTHING_USER_IDS_FILE='.syncthingids'
41 41
 
42
+function configure_interactive_syncthing {
43
+    echo -n ''
44
+}
45
+
42 46
 function install_interactive_syncthing {
43 47
     echo -n ''
44 48
 }

+ 4
- 0
src/freedombone-app-tahoelafs Datei anzeigen

@@ -39,6 +39,10 @@ TAHOELAFS_STORAGE_SPACE=1G
39 39
 TAHOELAFS_SHARED_DIR='Shared'
40 40
 TAHOE_COMMAND="cd /var/lib/tahoelafs && venv/bin/tahoe"
41 41
 
42
+function configure_interactive_tahoelafs {
43
+    echo -n ''
44
+}
45
+
42 46
 function install_interactive_tahoelafs {
43 47
     echo -n ''
44 48
 }

+ 4
- 0
src/freedombone-app-tox Datei anzeigen

@@ -49,6 +49,10 @@ TOXIC_FILE=/usr/local/bin/toxic
49 49
 QTOX_REPO="https://github.com/bashrc/qTox"
50 50
 QTOX_COMMIT='27a628a3789fca4f31516c3982e580052dd3c773'
51 51
 
52
+function configure_interactive_tox {
53
+    echo -n ''
54
+}
55
+
52 56
 function install_interactive_tox {
53 57
     echo -n ''
54 58
 }

+ 4
- 0
src/freedombone-app-vpn Datei anzeigen

@@ -30,6 +30,10 @@
30 30
 
31 31
 VARIANTS=''
32 32
 
33
+function configure_interactive_vpn {
34
+    echo -n ''
35
+}
36
+
33 37
 function install_interactive_vpn {
34 38
     echo -n ''
35 39
 }

+ 4
- 0
src/freedombone-app-webmail Datei anzeigen

@@ -38,6 +38,10 @@ WEBMAIL_ADMIN_PASSWORD=
38 38
 WEB_PATH=/var/www
39 39
 WEBMAIL_PATH=$WEB_PATH/webmail
40 40
 
41
+function configure_interactive_webmail {
42
+    echo -n ''
43
+}
44
+
41 45
 function install_interactive_webmail {
42 46
     echo -n ''
43 47
 }

+ 4
- 0
src/freedombone-app-wiki Datei anzeigen

@@ -36,6 +36,10 @@ WIKI_TITLE="${PROJECT_NAME} Wiki"
36 36
 WIKI_CODE=
37 37
 WIKI_ONION_PORT=8089
38 38
 
39
+function configure_interactive_wiki {
40
+    echo -n ''
41
+}
42
+
39 43
 function install_interactive_wiki {
40 44
     echo -n ''
41 45
 }

+ 4
- 0
src/freedombone-app-xmpp Datei anzeigen

@@ -37,6 +37,10 @@ XMPP_PASSWORD=
37 37
 XMPP_CIPHERS='"EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA"'
38 38
 XMPP_ECC_CURVE='"secp384r1"'
39 39
 
40
+function configure_interactive_xmpp {
41
+    echo -n ''
42
+}
43
+
40 44
 function install_interactive_xmpp {
41 45
     echo -n ''
42 46
 }

+ 4
- 0
src/freedombone-app-zeronet Datei anzeigen

@@ -49,6 +49,10 @@ ZERONET_DEFAULT_MAIL_TAGLINE="Mail for the Mesh"
49 49
 ZERONET_ID_REPO="https://github.com/HelloZeroNet/ZeroID"
50 50
 ZERONET_ID_COMMIT='ccf14fdc96fa9cdb2ddd8a7ab283a8e17a4f234b'
51 51
 
52
+function configure_interactive_zeronet {
53
+    echo -n ''
54
+}
55
+
52 56
 function install_interactive_zeronet {
53 57
     echo -n ''
54 58
 }

+ 65
- 233
src/freedombone-controlpanel Datei anzeigen

@@ -686,66 +686,6 @@ function change_password {
686 686
            --msgbox $"Password for $SELECTED_USERNAME was changed" 6 40
687 687
 }
688 688
 
689
-function irc_show_password {
690
-    IRC_PASSWORD=$(cat /etc/ngircd/ngircd.conf | grep "Password =" | head -n 1 | awk -F '=' '{print $2}')
691
-    dialog --title $"IRC Password" \
692
-           --msgbox "$IRC_PASSWORD" 6 40
693
-}
694
-
695
-function irc_set_global_password {
696
-    dialog --title $"IRC Password" \
697
-           --clear \
698
-           --backtitle $"Freedombone Control Panel" \
699
-           --passwordbox $"Password for all IRC users, or press Enter for no password" 10 50 2> $data
700
-    sel=$?
701
-    case $sel in
702
-        0)
703
-            EXISTING_IRC_PASSWORD=$(cat /etc/ngircd/ngircd.conf | grep "Password =" | head -n 1 | awk -F '=' '{print $2}')
704
-            NEW_IRC_PASSWORD=$(<$data)
705
-            sed -i "0,/RE/s/Password =.*/Password =$NEW_IRC_PASSWORD/" /etc/ngircd/ngircd.conf
706
-
707
-            # replace the password for all users
708
-            for d in /home/*/ ; do
709
-                IRC_USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
710
-                if [[ $IRC_USERNAME != "git" && $IRC_USERNAME != "mirrors" && $IRC_USERNAME != "sync" && $IRC_USERNAME != "tahoelafs" ]]; then
711
-                    if [ -f /home/$IRC_USERNAME/.irssi/config ]; then
712
-                        sed -i "s|$EXISTING_IRC_PASSWORD|$NEW_IRC_PASSWORD|g" /home/$IRC_USERNAME/.irssi/config
713
-                        chown -R $IRC_USERNAME:$IRC_USERNAME /home/$IRC_USERNAME/.irssi
714
-                    fi
715
-                fi
716
-            done
717
-
718
-            # restart the daemon for the new password to take effect
719
-            systemctl restart ngircd
720
-
721
-            dialog --title $"IRC Password" \
722
-                   --msgbox $"The IRC password was changed" 6 40
723
-            ;;
724
-    esac
725
-}
726
-
727
-function change_blog_avatar {
728
-    data=$(tempfile 2>/dev/null)
729
-    trap "rm -f $data" 0 1 2 5 15
730
-    dialog --title $"Change blog avatar" \
731
-           --backtitle $"Freedombone Control Panel" \
732
-           --inputbox $"Enter a URL for an image. It should be approximately a square image." 8 75 2>$data
733
-    sel=$?
734
-    case $sel in
735
-        0)
736
-            IMAGE_URL=$(<$data)
737
-            if [ ${#IMAGE_URL} -gt 5 ]; then
738
-                clear
739
-                ${PROJECT_NAME}-blog -a $IMAGE_URL
740
-                if [ "$?" = "0" ]; then
741
-                    dialog --title $"Change blog avatar" \
742
-                           --msgbox $"Your blog avatar has been changed" 6 40
743
-                fi
744
-            fi
745
-            ;;
746
-    esac
747
-}
748
-
749 689
 function change_ssh_public_key {
750 690
     select_user
751 691
     if [ ! $SELECTED_USERNAME ]; then
@@ -1367,67 +1307,6 @@ function reset_tripwire {
1367 1307
     any_key
1368 1308
 }
1369 1309
 
1370
-function hubzilla_renew_cert {
1371
-    dialog --title $"Renew SSL certificate" \
1372
-           --backtitle $"Freedombone Control Panel" \
1373
-           --yesno $"\nThis will renew a letsencrypt certificate. Select 'yes' to continue" 16 60
1374
-    sel=$?
1375
-    case $sel in
1376
-        1) return;;
1377
-        255) return;;
1378
-    esac
1379
-    HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
1380
-    if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
1381
-        dialog --title $"Renew SSL certificate" \
1382
-               --msgbox $"Hubzilla install directory not found" 6 40
1383
-        return
1384
-    fi
1385
-    ${PROJECT_NAME}-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
1386
-    if [ ! "$?" = "0" ]; then
1387
-        any_key
1388
-    else
1389
-        dialog --title $"Renew SSL certificate" \
1390
-               --msgbox $"Hubzilla certificate has been renewed" 6 40
1391
-    fi
1392
-}
1393
-
1394
-function hubzilla_channel_directory_server {
1395
-    if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
1396
-        dialog --title $"Hubzilla channel directory server" \
1397
-               --msgbox $"Hubzilla is not installed on this system" 6 40
1398
-        return
1399
-    fi
1400
-    HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
1401
-    if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
1402
-        dialog --title $"Hubzilla channel directory server" \
1403
-               --msgbox $"Hubzilla install directory not found" 6 40
1404
-        return
1405
-    fi
1406
-
1407
-    data=$(tempfile 2>/dev/null)
1408
-    trap "rm -f $data" 0 1 2 5 15
1409
-    dialog --title $"Hubzilla channel directory server" \
1410
-           --backtitle $"Freedombone Control Panel" \
1411
-           --inputbox $"When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
1412
-    sel=$?
1413
-    case $sel in
1414
-        0)
1415
-            hubzilla_domain_server=$(<$data)
1416
-            if [[ $hubzilla_domain_server != *"."* ]]; then
1417
-                return
1418
-            fi
1419
-            if [[ $hubzilla_domain_server != "https"* ]]; then
1420
-                dialog --title $"Hubzilla channel directory server" \
1421
-                       --msgbox $"Invalid domain - include the https://" 6 40
1422
-                return
1423
-            fi
1424
-            ./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
1425
-            dialog --title $"Hubzilla channel directory server" \
1426
-                   --msgbox $"Domain channel directory server changed to $hubzilla_domain_server" 6 40
1427
-            ;;
1428
-    esac
1429
-}
1430
-
1431 1310
 function format_drive {
1432 1311
     drive=
1433 1312
     data=$(tempfile 2>/dev/null)
@@ -1917,55 +1796,6 @@ function menu_users {
1917 1796
     done
1918 1797
 }
1919 1798
 
1920
-function menu_hubzilla {
1921
-    while true
1922
-    do
1923
-        data=$(tempfile 2>/dev/null)
1924
-        trap "rm -f $data" 0 1 2 5 15
1925
-        dialog --backtitle $"Freedombone Control Panel" \
1926
-               --title $"Hubzilla" \
1927
-               --radiolist $"Choose an operation:" 13 70 4 \
1928
-               1 $"Set channel directory server" off \
1929
-               2 $"Renew SSL certificate" off \
1930
-               3 $"Back to main menu" on 2> $data
1931
-        sel=$?
1932
-        case $sel in
1933
-            1) break;;
1934
-            255) break;;
1935
-        esac
1936
-        case $(cat $data) in
1937
-            1) hubzilla_channel_directory_server;;
1938
-            2) hubzilla_renew_cert;;
1939
-            3) break;;
1940
-        esac
1941
-    done
1942
-}
1943
-
1944
-function menu_media {
1945
-    while true
1946
-    do
1947
-        data=$(tempfile 2>/dev/null)
1948
-        trap "rm -f $data" 0 1 2 5 15
1949
-        dialog --backtitle $"Freedombone Control Panel" \
1950
-               --title $"Media Menu" \
1951
-               --radiolist $"Choose an operation:" 13 70 3 \
1952
-               1 $"Attach a drive containing playable media" off \
1953
-               2 $"Remove a drive containing playable media" off \
1954
-               3 $"Exit" on 2> $data
1955
-        sel=$?
1956
-        case $sel in
1957
-            1) break;;
1958
-            255) break;;
1959
-        esac
1960
-        case $(cat $data) in
1961
-            1) remove-music
1962
-               attach-music;;
1963
-            2) remove-music;;
1964
-            3) break;;
1965
-        esac
1966
-    done
1967
-}
1968
-
1969 1799
 function wifi_enable {
1970 1800
     disable_wifi='yes'
1971 1801
     dialog --title $"Enable Wifi" \
@@ -2018,34 +1848,42 @@ function menu_wifi {
2018 1848
     done
2019 1849
 }
2020 1850
 
2021
-function menu_irc {
2022
-    if [ ! -d /etc/ngircd ]; then
2023
-        dialog --title $"IRC Menu" \
2024
-               --msgbox $"No IRC server is installed" 6 70
2025
-        return
2026
-    fi
1851
+function app_settings {
2027 1852
 
2028
-    while true
1853
+
1854
+    detect_installable_apps
1855
+
1856
+    applist=""
1857
+    appnames=()
1858
+    n=1
1859
+    app_index=0
1860
+    for a in "${APPS_AVAILABLE[@]}"
2029 1861
     do
2030
-        data=$(tempfile 2>/dev/null)
2031
-        trap "rm -f $data" 0 1 2 5 15
2032
-        dialog --backtitle $"Freedombone Control Panel" \
2033
-               --title $"IRC Menu" \
2034
-               --radiolist $"Choose an operation:" 14 70 4 \
2035
-               1 $"Set a password for all IRC users" off \
2036
-               2 $"Show current IRC login password" off \
2037
-               3 $"Exit" on 2> $data
2038
-        sel=$?
2039
-        case $sel in
2040
-            1) break;;
2041
-            255) break;;
2042
-        esac
2043
-        case $(cat $data) in
2044
-            1) irc_set_global_password;;
2045
-            2) irc_show_password;;
2046
-            3) break;;
2047
-        esac
1862
+        if [[ ${APPS_INSTALLED[$app_index]} != "0" ]]; then
1863
+            if [[ $(function_exists configure_interactive_${a}) == "1" ]]; then
1864
+                applist="$applist $n $a off"
1865
+                n=$[n+1]
1866
+                appnames+=("$a")
1867
+            fi
1868
+        fi
1869
+        app_index=$[app_index+1]
2048 1870
     done
1871
+    backstr=$'Back to main menu'
1872
+    applist="$applist $n $backstr on"
1873
+    appnames+=("Exit")
1874
+
1875
+    choices=$(dialog --stdout --backtitle $"Freedombone" \
1876
+                     --title $"Change Settings for an App" \
1877
+                     --radiolist $'Choose:' \
1878
+                     27 40 20 $applist)
1879
+
1880
+    if [ $? -eq 0 ]; then
1881
+        for choice in $choices
1882
+        do
1883
+            app_index = $[choice-1]
1884
+            configure_interactive_${appname[$app_index]}
1885
+        done
1886
+    fi
2049 1887
 }
2050 1888
 
2051 1889
 function menu_top_level {
@@ -2059,25 +1897,22 @@ function menu_top_level {
2059 1897
                1 $"About this system" off \
2060 1898
                2 $"Backup and Restore" off \
2061 1899
                3 $"Reset Tripwire" off \
2062
-               4 $"Logging on/off" off \
2063
-               5 $"Ping enable/disable" off \
2064
-               6 $"Manage Users" off \
2065
-               7 $"Email Filtering Rules" off \
2066
-               8 $"Outgoing Email Proxy" off \
2067
-               9 $"Security Settings" off \
2068
-               10 $"Set the main repository (repo mirrors)" off \
2069
-               11 $"Hubzilla" off \
2070
-               12 $"Media menu" off \
2071
-               13 $"IRC menu" off \
2072
-               14 $"Change your blog avatar" off \
2073
-               15 $"Change the name of this system" off \
2074
-               16 $"Set the TLS date/time source" off \
2075
-               17 $"Set a static local IP address" off \
2076
-               18 $"Wifi menu" off \
2077
-               19 $"Check for updates" off \
2078
-               20 $"Power off the system" off \
2079
-               21 $"Restart the system" off \
2080
-               22 $"Exit" on 2> $data
1900
+               4 $"App Settings" off \
1901
+               5 $"Logging on/off" off \
1902
+               6 $"Ping enable/disable" off \
1903
+               7 $"Manage Users" off \
1904
+               8 $"Email Filtering Rules" off \
1905
+               9 $"Outgoing Email Proxy" off \
1906
+               10 $"Security Settings" off \
1907
+               11 $"Set the main repository (repo mirrors)" off \
1908
+               12 $"Change the name of this system" off \
1909
+               13 $"Set the TLS date/time source" off \
1910
+               14 $"Set a static local IP address" off \
1911
+               15 $"Wifi menu" off \
1912
+               16 $"Check for updates" off \
1913
+               17 $"Power off the system" off \
1914
+               18 $"Restart the system" off \
1915
+               19 $"Exit" on 2> $data
2081 1916
         sel=$?
2082 1917
         case $sel in
2083 1918
             1) exit 1;;
@@ -2087,25 +1922,22 @@ function menu_top_level {
2087 1922
             1) show_about;;
2088 1923
             2) menu_backup_restore;;
2089 1924
             3) reset_tripwire;;
2090
-            4) logging_on_off;;
2091
-            5) ping_enable_disable;;
2092
-            6) menu_users;;
2093
-            7) menu_email;;
2094
-            8) smtp_proxy;;
2095
-            9) security_settings;;
2096
-            10) set_main_repo;;
2097
-            11) menu_hubzilla;;
2098
-            12) menu_media;;
2099
-            13) menu_irc;;
2100
-            14) change_blog_avatar;;
2101
-            15) change_system_name;;
2102
-            16) set_tls_time_source;;
2103
-            17) set_static_IP;;
2104
-            18) menu_wifi;;
2105
-            19) check_for_updates;;
2106
-            20) shut_down_system;;
2107
-            21) restart_system;;
2108
-            22) break;;
1925
+            4) app_settings;;
1926
+            5) logging_on_off;;
1927
+            6) ping_enable_disable;;
1928
+            7) menu_users;;
1929
+            8) menu_email;;
1930
+            9) smtp_proxy;;
1931
+            10) security_settings;;
1932
+            11) set_main_repo;;
1933
+            12) change_system_name;;
1934
+            13) set_tls_time_source;;
1935
+            14) set_static_IP;;
1936
+            15) menu_wifi;;
1937
+            16) check_for_updates;;
1938
+            17) shut_down_system;;
1939
+            18) restart_system;;
1940
+            19) break;;
2109 1941
         esac
2110 1942
     done
2111 1943
 }