|
@@ -152,31 +152,26 @@ function friendica_allow_registrations {
|
152
|
152
|
}
|
153
|
153
|
|
154
|
154
|
function configure_interactive_friendica {
|
|
155
|
+ W=(1 $"Set channel directory server"
|
|
156
|
+ 2 $"Renew SSL certificate"
|
|
157
|
+ 3 $"Close new account registrations"
|
|
158
|
+ 4 $"Allow new account registrations")
|
|
159
|
+
|
155
|
160
|
while true
|
156
|
161
|
do
|
157
|
|
- data=$(mktemp 2>/dev/null)
|
158
|
|
- dialog --backtitle $"Freedombone Control Panel" \
|
159
|
|
- --title $"Friendica" \
|
160
|
|
- --radiolist $"Choose an operation:" 15 70 6 \
|
161
|
|
- 1 $"Set channel directory server" off \
|
162
|
|
- 2 $"Renew SSL certificate" off \
|
163
|
|
- 3 $"Close new account registrations" off \
|
164
|
|
- 4 $"Allow new account registrations" off \
|
165
|
|
- 5 $"Back to main menu" on 2> "$data"
|
166
|
|
- sel=$?
|
167
|
|
- case $sel in
|
168
|
|
- 1) break;;
|
169
|
|
- 255) break;;
|
170
|
|
- esac
|
171
|
|
- case $(cat "$data") in
|
|
162
|
+ # shellcheck disable=SC2068
|
|
163
|
+ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Friendica" --menu $"Choose an operation, or ESC to exit:" 14 60 4 "${W[@]}" 3>&2 2>&1 1>&3)
|
|
164
|
+
|
|
165
|
+ if [ ! "$selection" ]; then
|
|
166
|
+ break
|
|
167
|
+ fi
|
|
168
|
+
|
|
169
|
+ case $selection in
|
172
|
170
|
1) friendica_channel_directory_server;;
|
173
|
171
|
2) friendica_renew_cert;;
|
174
|
172
|
3) friendica_close_registrations;;
|
175
|
173
|
4) friendica_allow_registrations;;
|
176
|
|
- 5) rm -f "$data"
|
177
|
|
- break;;
|
178
|
174
|
esac
|
179
|
|
- rm -f "$data"
|
180
|
175
|
done
|
181
|
176
|
}
|
182
|
177
|
|