From 6ea84f934e85c8dcdf30277b3671eeefc48c6de0 Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 9 Sep 2020 20:52:19 +0200 Subject: [PATCH] always run the locales script directly after changing the keyboard configuration (#1432) * move startup_configuration above server_configuration Co-authored-by: Daniel Hansson --- menu/main_menu.sh | 10 +++++----- menu/startup_configuration.sh | 10 ++++------ nextcloud-startup-script.sh | 3 --- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/menu/main_menu.sh b/menu/main_menu.sh index fe0477e7..366773e8 100644 --- a/menu/main_menu.sh +++ b/menu/main_menu.sh @@ -21,8 +21,8 @@ root_check choice=$(whiptail --title "$TITLE" --menu "Choose what you want to do.\n$MENU_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \ "Additional Apps" "(Choose which apps to install)" \ "Nextcloud Configuration" "(Choose between available Nextcloud configurations)" \ -"Server Configuration" "(Choose between available server configurations)" \ "Startup Configuration" "(Choose between available startup configurations)" \ +"Server Configuration" "(Choose between available server configurations)" \ "Update Nextcloud" "(Update Nextcloud to the latest release)" 3>&1 1>&2 2>&3) case "$choice" in @@ -34,14 +34,14 @@ case "$choice" in print_text_in_color "$ICyan" "Downloading the Nextcloud Configuration script..." run_script MENU nextcloud_configuration ;; - "Server Configuration") - print_text_in_color "$ICyan" "Downloading the Server Configuration script..." - run_script MENU server_configuration - ;; "Startup Configuration") print_text_in_color "$ICyan" "Downloading the Startup Configuration script..." run_script MENU startup_configuration ;; + "Server Configuration") + print_text_in_color "$ICyan" "Downloading the Server Configuration script..." + run_script MENU server_configuration + ;; "Update Nextcloud") if [ -f $SCRIPTS/update.sh ] then diff --git a/menu/startup_configuration.sh b/menu/startup_configuration.sh index e32b8967..8989219c 100644 --- a/menu/startup_configuration.sh +++ b/menu/startup_configuration.sh @@ -59,15 +59,13 @@ case "$choice" in sleep 1 clear else + # Change layout dpkg-reconfigure keyboard-configuration setupcon --force # Set locales - if ! [ -f "$SCRIPTS/nextcloud-startup-script.sh" ] - then - run_script ADDONS locales - fi - input_box "The Keyboard Layout was changed.\nPlease try out all buttons (e.g: @ # \$ : y n) to find out if the keyboard settings were correctly applied.\nIf the keyboard is still wrong, you will be offered to reboot the server in the next step.\n\nPlease continue by hitting [ENTER]" "$SUBTITLE" >/dev/null - if ! yesno_box_yes "Did the keyboard work as expected??\n\nIf you choose 'No' the server will be rebooted. After the reboot, please login as usual and run this script again." "$SUBTITLE" + run_script ADDONS locales + input_box "Please try out all buttons (e.g: @ # \$ : y n) to find out if the keyboard settings were correctly applied.\nIf the keyboard is still wrong, you will be offered to reboot the server in the next step.\n\nPlease continue by hitting [ENTER]" >/dev/null + if ! yesno_box_yes "Did the keyboard work as expected??\n\nIf you choose 'No' the server will be rebooted. After the reboot, please login as usual and run this script again." then reboot fi diff --git a/nextcloud-startup-script.sh b/nextcloud-startup-script.sh index 0b55ccc3..7f3875b2 100644 --- a/nextcloud-startup-script.sh +++ b/nextcloud-startup-script.sh @@ -309,9 +309,6 @@ When the setup is done, the server will automatically reboot. Please report any issues to: $ISSUES" clear -# Set locales -run_script ADDONS locales - # Change timezone in PHP sed -i "s|;date.timezone.*|date.timezone = $(cat /etc/timezone)|g" "$PHP_INI"