#!/usr/bin/env bash # Host-only PostgreSQL automation; no Django or application scheduler dependency. . "$(dirname -- "${BASH_SOURCE[0]}")/lib.sh" NEED_SITE_ENV=true for arg in "$@"; do case "${arg}" in -h|--help) NEED_SITE_ENV=false ;; esac done if [ "${1:-}" = install ] && [ "${NEED_SITE_ENV}" = true ]; then load_env export AUTO_BACKUP_PROJECT="${COMPOSE_PROJECT_NAME:-pi-continuum}" export AUTO_BACKUP_DB="${POSTGRESQL_DB:?POSTGRESQL_DB is required}" export AUTO_BACKUP_ENV_FILE="${ENV_FILE}" fi exec python3 "${DEPLOY_DIR}/bin/auto_backup.py" "$@"