Merge pull request #13 from Aterfax/Update-.env.example-to-remove-double-quotes

Update .env.example to remove double quotes.
This commit is contained in:
Aterfax 2025-03-24 14:43:09 +00:00 committed by GitHub
commit 4312e6db39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 16 deletions

View File

@ -1,8 +1,8 @@
# The 4 variables below are required. # The 4 variables below are required.
PBS_ENCRYPTION_PASSWORD="123456789abcdefghijklmn" PBS_ENCRYPTION_PASSWORD=123456789abcdefghijklmn
PBS_ENDPOINT="pbs.mydomain.com" PBS_ENDPOINT=pbs.mydomain.com
PBS_DATASTORE="test-datastore" PBS_DATASTORE=test-datastore
CRON_SCHEDULE="0 */4 * * *" CRON_SCHEDULE=0 */4 * * *
# If you want to skip backup on startup, set CRON_BACKUP_ONLY=1 otherwise CRON_BACKUP_ONLY=0 # If you want to skip backup on startup, set CRON_BACKUP_ONLY=1 otherwise CRON_BACKUP_ONLY=0
CRON_BACKUP_ONLY=0 CRON_BACKUP_ONLY=0
@ -13,22 +13,22 @@ UNENCRYPTED=0
# Use of the PBS_API_KEY_NAME and PBS_API_KEY_SECRET is recommended! # Use of the PBS_API_KEY_NAME and PBS_API_KEY_SECRET is recommended!
# If unset, ensure PBS_USER and PBS_PASSWORD are set. # If unset, ensure PBS_USER and PBS_PASSWORD are set.
PBS_API_KEY_NAME="username@pam!test" PBS_API_KEY_NAME=username@pam!test
PBS_API_KEY_SECRET="4054356a-f1a6-441e-86fc-e338367db185" PBS_API_KEY_SECRET=4054356a-f1a6-441e-86fc-e338367db185
# PBS_USER is not required if PBS_API_KEY_NAME is set. # PBS_USER is not required if PBS_API_KEY_NAME is set.
# PBS_PASSWORD is not required if PBS_API_KEY_SECRET is set. # PBS_PASSWORD is not required if PBS_API_KEY_SECRET is set.
PBS_USER="" PBS_USER=
PBS_PASSWORD="" PBS_PASSWORD=
# PBS_DATASTORE_NS is optional but should be set if using namespaces. # PBS_DATASTORE_NS is optional but should be set if using namespaces.
PBS_DATASTORE_NS="test" PBS_DATASTORE_NS=test
# PBS_FINGERPRINT is required if using a self signed SSL certificate. # PBS_FINGERPRINT is required if using a self signed SSL certificate.
PBS_FINGERPRINT="" PBS_FINGERPRINT=
# Healthchecks.io details - Optional. # Healthchecks.io details - Optional.
HEALTHCHECKSUUID="aa7b0de3-2c17-4fce-b051-388a5415e656" HEALTHCHECKSUUID=aa7b0de3-2c17-4fce-b051-388a5415e656
HEALTHCHECKSHOSTNAME="https://healthchecks.mydomain.com" HEALTHCHECKSHOSTNAME=https://healthchecks.mydomain.com
TZ=Etc/UTC TZ=Etc/UTC

View File

@ -30,8 +30,11 @@ if [ -z "$PBS_PASSWORD" ]; then
exit 1 exit 1
fi fi
HEALTHCHECKSURL="${HEALTHCHECKSHOSTNAME}/ping/${HEALTHCHECKSUUID}" # Evaluate each subvariable and replace all spaces with nothing - if not zero length set variable.
if [[ ! -z "${HEALTHCHECKSHOSTNAME// }" ]] && [[ ! -z "${HEALTHCHECKSUUID// }" ]]; then
HEALTHCHECKSURL="${HEALTHCHECKSHOSTNAME}/ping/${HEALTHCHECKSUUID}"
export HEALTHCHECKSURL="${HEALTHCHECKSURL}"
fi
export HEALTHCHECKSURL="${HEALTHCHECKSURL}"
export PBS_PASSWORD="${PBS_PASSWORD}" export PBS_PASSWORD="${PBS_PASSWORD}"
export PBS_REPOSITORY="${PBS_USER}@${PBS_ENDPOINT}:${PBS_DATASTORE}" export PBS_REPOSITORY="${PBS_USER}@${PBS_ENDPOINT}:${PBS_DATASTORE}"