From 252a3320df7a49b69b957b690be9dbb47e8666cf Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 30 Aug 2026 11:08:31 +0000 Subject: [PATCH] fix: require external database password file --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 61f22d2..c5128ad 100644 --- a/install.sh +++ b/install.sh @@ -39,6 +39,7 @@ command -v curl >/dev/null || die 'curl is required' command -v zstd >/dev/null || die 'zstd is required for release archives' command -v python3 >/dev/null || die 'python3 is required for safe archive extraction' if [[ $PG_HOST != postgres && $EXISTING_DB != 1 ]]; then die 'an external database requires --existing-db confirmation'; fi +if [[ $PG_HOST != postgres && -z $PG_PASSWORD_FILE ]]; then die 'an external database requires --postgres-password-file'; fi if ! [[ $API_PORT =~ ^[0-9]+$ && $WEBDAV_PORT =~ ^[0-9]+$ && $TVBOX_PORT =~ ^[0-9]+$ ]]; then die 'ports must be numeric'; fi if ! [[ $PG_PORT =~ ^[0-9]+$ && $PG_DB =~ ^[A-Za-z0-9_]+$ && $PG_USER =~ ^[A-Za-z0-9_]+$ && $PG_HOST =~ ^[A-Za-z0-9._-]+$ ]]; then die 'invalid PostgreSQL connection values'; fi mkdir -p "$INSTALL_DIR" "$INSTALL_DIR"/{data/postgres,data,state,components,releases,secrets,config}