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 \