Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/menu
diff options
context:
space:
mode:
authorDaniel Hansson <github@hanssonit.se>2021-03-10 14:12:58 +0300
committerGitHub <noreply@github.com>2021-03-10 14:12:58 +0300
commit8083698866163fdced03b6c76a39e352d05039d1 (patch)
tree9994202b929867d1683c463300bf725bfde1f692 /menu
parent389324c42870f78f4a73567d99c5fa21d990b187 (diff)
deSEC magic (#1725)
Co-authored-by: Peter Thomassen <4242683+peterthomassen@users.noreply.github.com> Co-authored-by: szaimen <szaimen@e.mail.de>
Diffstat (limited to 'menu')
-rw-r--r--menu/server_configuration.sh43
1 files changed, 27 insertions, 16 deletions
diff --git a/menu/server_configuration.sh b/menu/server_configuration.sh
index b2fd8c11..71227bbd 100644
--- a/menu/server_configuration.sh
+++ b/menu/server_configuration.sh
@@ -48,6 +48,7 @@ choice=$(whiptail --title "$TITLE" --checklist \
$CHECKLIST_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
"Static IP" "(Set static IP in Ubuntu with netplan.io)" OFF \
"Security" "(Add extra security based on this http://goo.gl/gEJHi7)" OFF \
+"deSEC" "(Automatically get a domain from desec.io, configure ddclient and activate TLS)" ON \
"DDclient Configuration" "(Use ddclient for automatic DDNS updates)" OFF \
"Activate TLS" "(Enable HTTPS with Let's Encrypt)" "$ACTIVATE_TLS_SWITCH" \
"GeoBlock" "(Only allow certain countries to access your server)" OFF \
@@ -64,35 +65,45 @@ case "$choice" in
print_text_in_color "$ICyan" "Downloading the Security script..."
run_script ADDONS security
;;&
+ *"deSEC"*)
+ print_text_in_color "$ICyan" "Downloading the deSEC script..."
+ run_script ADDONS desec
+ ;;&
*"DDclient Configuration"*)
- print_text_in_color "$ICyan" "Downloading the DDclient Configuration script..."
- run_script NETWORK ddclient-configuration
+ if [[ "$choice" != *"deSEC"* ]]
+ then
+ print_text_in_color "$ICyan" "Downloading the DDclient Configuration script..."
+ run_script NETWORK ddclient-configuration
+ fi
;;&
*"Activate TLS"*)
- SUBTITLE="Activate TLS"
- msg_box "The following script will install a trusted
+ if [[ "$choice" != *"deSEC"* ]]
+ then
+ SUBTITLE="Activate TLS"
+ msg_box "The following script will install a trusted
TLS certificate through Let's Encrypt.
It's recommended to use TLS (https) together with Nextcloud.
Please open port 80 and 443 to this servers IP before you continue.
More information can be found here:
https://www.techandme.se/open-port-80-443/" "$SUBTITLE"
- if yesno_box_yes "Do you want to install TLS?" "$SUBTITLE"
- then
- if [ -f $SCRIPTS/activate-tls.sh ]
+ if yesno_box_yes "Do you want to install TLS?" "$SUBTITLE"
then
- bash $SCRIPTS/activate-tls.sh
+ if [ -f $SCRIPTS/activate-tls.sh ]
+ then
+ bash $SCRIPTS/activate-tls.sh
+ else
+ print_text_in_color "$ICyan" "Downloading the Let's Encrypt script..."
+ download_script LETS_ENC activate-tls
+ bash $SCRIPTS/activate-tls.sh
+ fi
else
- print_text_in_color "$ICyan" "Downloading the Let's Encrypt script..."
- download_script LETS_ENC activate-tls
- bash $SCRIPTS/activate-tls.sh
+ msg_box "OK, but if you want to run it later, just type: sudo bash $SCRIPTS/activate-tls.sh" "$SUBTITLE"
fi
- else
- msg_box "OK, but if you want to run it later, just type: sudo bash $SCRIPTS/activate-tls.sh" "$SUBTITLE"
+
+ # Just make sure it is gone
+ rm -f "$SCRIPTS/test-new-config.sh"
fi
-
- # Just make sure it is gone
- rm -f "$SCRIPTS/test-new-config.sh"
;;&
*"GeoBlock"*)
print_text_in_color "$ICyan" "Downloading the Geoblock script..."