Initial upload to Gitea

This commit is contained in:
antonn committed 2026-11-30 16:32:37 +00:00
1 parent 78193254ad
commit 8478998cae
1485 files changed
+461025 -42348

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# ADPanel privileged job: re-run pgAdmin setup-web.sh to (re)create the
# initial admin account, then restart Apache.
# Invoked via adpanel-priv: adpanel-priv job pgadmin-setup-recover
# Environment: PGADMIN_SETUP_EMAIL, PGADMIN_SETUP_PASSWORD
set -u
SETUP_SCRIPT=""
if [ -x /usr/pgadmin4/bin/setup-web.sh ]; then
SETUP_SCRIPT="/usr/pgadmin4/bin/setup-web.sh"
elif [ -x /usr/share/pgadmin4/bin/setup-web.sh ]; then
SETUP_SCRIPT="/usr/share/pgadmin4/bin/setup-web.sh"
fi
if [ -n "$SETUP_SCRIPT" ]; then
: "${PGADMIN_SETUP_EMAIL:?PGADMIN_SETUP_EMAIL not set}"
: "${PGADMIN_SETUP_PASSWORD:?PGADMIN_SETUP_PASSWORD not set}"
"$SETUP_SCRIPT" --yes >/dev/null 2>&1 || true
rm -f /etc/apache2/conf-enabled/pgadmin4.conf 2>/dev/null || true
systemctl restart apache2 2>/dev/null || systemctl start apache2 2>/dev/null || true
fi