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

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2017-04-27 19:21:55 +0300
committernachoparker <nacho@ownyourbits.com>2017-04-27 20:25:18 +0300
commit2877a2826dcbe12f33c94eac87e2af5d23bbbd4f (patch)
tree7cc076090a8224086aad4eb0c88213d33abec55d
parent8200602ee5d4260be00a69c17b1a781068a5fb5e (diff)
return to menu in nextcloudpi-configv0.8.4
-rwxr-xr-xbin/nextcloudpi-config24
-rwxr-xr-xetc/library.sh3
2 files changed, 14 insertions, 13 deletions
diff --git a/bin/nextcloudpi-config b/bin/nextcloudpi-config
index fc3fda21..edb66f57 100755
--- a/bin/nextcloudpi-config
+++ b/bin/nextcloudpi-config
@@ -38,19 +38,21 @@ function nextcloud-config()
local DESC=$( grep "DESCRIPTION=" $item | sed 's|^DESCRIPTION="||;s|"$||' )
LIST+=( $( basename $item .sh ) "$DESC" )
done
- local script
- script=$( whiptail --backtitle "$BACKTITLE $( cat /usr/local/etc/ncp-version )" \
- --title "NextCloudPi Software Configuration Tool (nextcloudpi-config)" \
- --cancel-button Finish --ok-button Select \
- --menu "Select program to configure and activate:" 20 100 10 \
- "${LIST[@]}" \
- 3>&1 1>&2 2>&3 )
+ while true; do
+ local script
+ script=$( whiptail --backtitle "$BACKTITLE $( cat /usr/local/etc/ncp-version )" \
+ --title "NextCloudPi Software Configuration Tool (nextcloudpi-config)" \
+ --cancel-button Finish --ok-button Select \
+ --menu "Select program to configure and activate:" 20 100 10 \
+ "${LIST[@]}" \
+ 3>&1 1>&2 2>&3 )
- [[ $? -ne $DIALOG_OK ]] || [[ "$script" == "" ]] && return 0
+ [[ $? -ne $DIALOG_OK ]] || [[ "$script" == "" ]] && return 0
- # launch selected script
- info_script $script.sh || return 1;
- configure_script $script.sh
+ # launch selected script
+ info_script $script.sh || continue;
+ configure_script $script.sh
+ done
}
if [ $(id -u) -ne 0 ]; then
diff --git a/etc/library.sh b/etc/library.sh
index aeb5fd97..76e4cc16 100755
--- a/etc/library.sh
+++ b/etc/library.sh
@@ -162,7 +162,6 @@ function config()
case $RET in
$DIALOG_CANCEL)
- echo "Aborted"
return 1
;;
$DIALOG_OK)
@@ -220,7 +219,7 @@ function configure_script()
(
local SCRIPT=$1
cd /usr/local/etc/nextcloudpi-config.d/
- config $SCRIPT || return 1 # writes "$INSTALLATION_CODE"
+ config $SCRIPT || return 0 # writes "$INSTALLATION_CODE"
echo -e "$INSTALLATION_CODE" > $SCRIPT # save configuration
source ./$SCRIPT # load configuration
echo -e "Configuring \e[1m$( basename $SCRIPT .sh )\e[0m"