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.
PBS_ENCRYPTION_PASSWORD="123456789abcdefghijklmn"
PBS_ENDPOINT="pbs.mydomain.com"
PBS_DATASTORE="test-datastore"
CRON_SCHEDULE="0 */4 * * *"
PBS_ENCRYPTION_PASSWORD=123456789abcdefghijklmn
PBS_ENDPOINT=pbs.mydomain.com
PBS_DATASTORE=test-datastore
CRON_SCHEDULE=0 */4 * * *
# If you want to skip backup on startup, set CRON_BACKUP_ONLY=1 otherwise 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!
# If unset, ensure PBS_USER and PBS_PASSWORD are set.
PBS_API_KEY_NAME="username@pam!test"
PBS_API_KEY_SECRET="4054356a-f1a6-441e-86fc-e338367db185"
PBS_API_KEY_NAME=username@pam!test
PBS_API_KEY_SECRET=4054356a-f1a6-441e-86fc-e338367db185
# 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_USER=""
PBS_PASSWORD=""
PBS_USER=
PBS_PASSWORD=
# 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=""
PBS_FINGERPRINT=
# Healthchecks.io details - Optional.
HEALTHCHECKSUUID="aa7b0de3-2c17-4fce-b051-388a5415e656"
HEALTHCHECKSHOSTNAME="https://healthchecks.mydomain.com"
HEALTHCHECKSUUID=aa7b0de3-2c17-4fce-b051-388a5415e656
HEALTHCHECKSHOSTNAME=https://healthchecks.mydomain.com
TZ=Etc/UTC
TZ=Etc/UTC

View File

@ -30,8 +30,11 @@ if [ -z "$PBS_PASSWORD" ]; then
exit 1
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_REPOSITORY="${PBS_USER}@${PBS_ENDPOINT}:${PBS_DATASTORE}"
export PBS_REPOSITORY="${PBS_USER}@${PBS_ENDPOINT}:${PBS_DATASTORE}"