From fee08bdd59fd0462242f793b691d0d7246e703b1 Mon Sep 17 00:00:00 2001 From: Andrew Hurley Date: Sun, 30 Oct 2022 16:43:56 +0000 Subject: [PATCH] checks --- nextcloud/install.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/nextcloud/install.sh b/nextcloud/install.sh index dfc8c10..3551622 100755 --- a/nextcloud/install.sh +++ b/nextcloud/install.sh @@ -17,7 +17,16 @@ if [[ $? -eq 0 && -n $RE ]]; then read -p "Enter Admin name: " USERNAME if [[ -z $USERNAME ]]; then printf "Nothing in username\n"; exit; fi if [[ -d $DATA/ncdata/$USERNAME ]]; then printf "Files exist for user $USERNAME\n"; exit 1; fi - ROOTPASS="$(LC_ALL=C install.log - else - printf "Error trying to change root password\n" - exit 1 + if [[ -z $LOG ]]; then + RE=$($P1 nextc-db bash -c "mysqladmin -u root password $ROOTPASS") + if [[ $? -eq 0 ]]; then + printf "Root password changed\n" + printf "ROOTPASS: $ROOTPASS\n" > install.log + else + printf "Error trying to set password\n" + exit 1 + fi fi RE=$($P1 nextc bash -c "$P2 maintenance:install --database mysql \