From cc5dbfdbbe92d84a8b57107b529cdeb40bbdcc11 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Fri, 25 Feb 2022 22:49:08 +0100 Subject: [PATCH] Update nasbeery2 --- nasbeery2 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nasbeery2 b/nasbeery2 index 05b2011..13f8946 100644 --- a/nasbeery2 +++ b/nasbeery2 @@ -44,8 +44,11 @@ while getopts "hU:P:H:D:FIZ:S:" opt; do done shift $((OPTIND-1)) -if [[ ! $(ls $PWD/nasbeery.conf > /dev/null 2&>1) ]]; then - cat << EOF > $PWD/nasbeery.conf +if [[ $(ls nasbeery.conf) ]]; then + source nasbeery.conf + PASSWORD_REPEAT=$PASSWORD +else + cat << EOF > nasbeery.conf USERNAME=$USERNAME PASSWORD='$PASSWORD' HOSTNAME=$HOSTNAME @@ -55,8 +58,6 @@ ADDONS=$ADDONS ZPOOL=$ZPOOL SHARE=$SHARE EOF -else - source $PWD/nasbeery.conf fi # Change password for Samba and Terminal