From eb34d26fde37372fba253f71ad964bfd4873f823 Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 23 Sep 2020 21:49:45 +0200 Subject: [PATCH] bring back the menu for the not-supported folder (#1491) --- lib.sh | 1 + not-supported/README.md | 9 ++++--- not-supported/not-supported.sh | 28 ++++++++++++++++++++++ not-supported/not-supported_menu.sh | 37 +++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 not-supported/not-supported.sh create mode 100644 not-supported/not-supported_menu.sh diff --git a/lib.sh b/lib.sh index 80263706..39eecafe 100644 --- a/lib.sh +++ b/lib.sh @@ -89,6 +89,7 @@ MENU="$GITHUB_REPO/menu" DISK="$GITHUB_REPO/disk" NETWORK="$GITHUB_REPO/network" VAGRANT_DIR="$GITHUB_REPO/vagrant" +NOT_SUPPORTED="$GITHUB_REPO/not-supported" NCREPO="https://download.nextcloud.com/server/releases" ISSUES="https://github.com/nextcloud/vm/issues" # User information diff --git a/not-supported/README.md b/not-supported/README.md index 5d5eecf3..c130ea16 100644 --- a/not-supported/README.md +++ b/not-supported/README.md @@ -4,9 +4,12 @@ This subdirectory of the Nextcloud VM contains scripts that are not yet ready fo ## Can I help? Yes, of course! :)
Although some things in those scripts might not be 100% ready, we would love to hear your feedback regarding those. -Feedback is especially welcome, if you would love to have some features that those scripts bring in the release version of the NcVM. +Feedback is especially welcome, if you would love to have some features that those scripts bring in the release version of the NcVM.
So please report back! 🚀 ### How to run this inside my NcVM? -Currently there is only one script inside this folder. The command to get and run this script is the following:
-`wget https://raw.githubusercontent.com/nextcloud/vm/master/not-supported/smbserver.sh && sudo bash smbserver.sh` +We have prepared a Menu for you to choose from available options. You can download the Menu with the following command:
+`wget https://raw.githubusercontent.com/nextcloud/vm/master/not-supported/not-supported.sh -P /var/scripts`
+After downloading the Menu, you just run it with the following command:
+`sudo bash /var/scripts/not-supported.sh`
+Running this second command will show the Menu with the latest options to choose from. diff --git a/not-supported/not-supported.sh b/not-supported/not-supported.sh new file mode 100644 index 00000000..fa5a899b --- /dev/null +++ b/not-supported/not-supported.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# T&M Hansson IT AB © - 2020, https://www.hanssonit.se/ + +# shellcheck disable=2034,2059 +true +SCRIPT_NAME="Not-supported Menu" +# shellcheck source=lib.sh +. <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh) + +# Check for errors + debug code and abort if something isn't right +# 1 = ON +# 0 = OFF +DEBUG=0 +debug_mode + +# Must be root +root_check + +print_text_in_color "$ICyan" "Running the Not-supported Menu script..." + +if network_ok +then + # Delete, download, run + run_script NOT_SUPPORTED not-supported_menu +fi + +exit diff --git a/not-supported/not-supported_menu.sh b/not-supported/not-supported_menu.sh new file mode 100644 index 00000000..a0928bae --- /dev/null +++ b/not-supported/not-supported_menu.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# T&M Hansson IT AB © - 2020, https://www.hanssonit.se/ + +# shellcheck disable=2034,2059 +true +SCRIPT_NAME="Not-supported Menu" +# shellcheck source=lib.sh +. <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh) + +# Check for errors + debug code and abort if something isn't right +# 1 = ON +# 0 = OFF +DEBUG=0 +debug_mode + +# Must be root +root_check + +# Main menu +choice=$(whiptail --title "$TITLE" --checklist "This is the Not-supported Menu of the Nextcloud VM! + +Please note that all options that get offered to you are not part of the released version and thus not 100% ready. +So please run them on your own risk. Feedback is more than welcome, though and can get reported here: $ISSUES + +Choose which one you want to execute.\n$CHECKLIST_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \ +"SMB-server" "(Create and manage a SMB-server on OS level)" OFF 3>&1 1>&2 2>&3) + +case "$choice" in + *"SMB-server"*) + print_text_in_color "$ICyan" "Downloading the SMB Server script..." + run_script NOT_SUPPORTED smbserver + ;;& + *) + ;; +esac +exit