Update CLI parsing.

This commit is contained in:
Derek Smith 2023-04-04 11:44:23 -04:00
parent 73ec75a9f2
commit 305c1afcbd
Signed by: farscapian
GPG Key ID: B443E530A14E1C90

View File

@ -35,13 +35,16 @@ if lxc remote get-default | grep -q "production"; then
fi fi
RUN_CERT_RENEWAL=true RUN_CERT_RENEWAL=false
SKIP_WWW=false SKIP_WWW=false
RESTORE_WWW=false RESTORE_WWW=false
RESTORE_CERTS=false RESTORE_CERTS=false
BACKUP_CERTS=false BACKUP_CERTS=false
BACKUP_APPS=false BACKUP_APPS=false
BACKUP_BTCPAY=false BACKUP_BTCPAY=false
BACKUP_CERTS=false
BACKUP_APPS=false
BACKUP_BTCPAY=false
BACKUP_BTCPAY_ARCHIVE_PATH= BACKUP_BTCPAY_ARCHIVE_PATH=
RESTORE_BTCPAY=false RESTORE_BTCPAY=false
SKIP_BTCPAY=false SKIP_BTCPAY=false
@ -63,12 +66,12 @@ for i in "$@"; do
RESTORE_CERTS=true RESTORE_CERTS=true
BACKUP_APPS=false BACKUP_APPS=false
RUN_CERT_RENEWAL=false RUN_CERT_RENEWAL=false
RESTART_FRONT_END=true
shift shift
;; ;;
--restore-btcpay) --restore-btcpay)
RESTORE_BTCPAY=true RESTORE_BTCPAY=true
BACKUP_BTCPAY=false BACKUP_BTCPAY=false
RUN_CERT_RENEWAL=false
shift shift
;; ;;
--backup-www) --backup-www)
@ -221,7 +224,8 @@ EOL
} }
export PROJECT_NAME="$(lxc info | grep "project:" | awk '{print $2}')" PROJECT_NAME="$(lxc info | grep "project:" | awk '{print $2}')"
export PROJECT_NAME="$PROJECT_NAME"
export PROJECT_PATH="$PROJECTS_PATH/$PROJECT_NAME" export PROJECT_PATH="$PROJECTS_PATH/$PROJECT_NAME"
mkdir -p "$PROJECT_PATH" "$REMOTE_PATH/projects" mkdir -p "$PROJECT_PATH" "$REMOTE_PATH/projects"