From 4da4a47eb759c4168408050a7753d8b7440c78ea Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sun, 31 May 2026 12:54:34 +0200 Subject: [PATCH] Webtrees: use PHP CLI for initial setup instead of curl to setup wizard (#14818) --- install/webtrees-install.sh | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/install/webtrees-install.sh b/install/webtrees-install.sh index 8064b86d9..68a19fc43 100644 --- a/install/webtrees-install.sh +++ b/install/webtrees-install.sh @@ -47,23 +47,21 @@ systemctl enable -q --now php${PHP_VER}-fpm systemctl restart caddy msg_info "Automating Webtrees Setup" -sleep 5 WT_ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c15) -curl -sS -X POST "http://127.0.0.1/" \ - -d "step=6" \ - --data-urlencode "baseurl=http://${LOCAL_IP}" \ - -d "lang=en-US" \ - -d "dbtype=mysql" \ - -d "dbhost=127.0.0.1" \ - -d "dbport=3306" \ - -d "dbuser=webtrees" \ - --data-urlencode "dbpass=${MARIADB_DB_PASS}" \ - -d "dbname=webtrees" \ - -d "tblpfx=wt_" \ - -d "wtname=Administrator" \ - -d "wtuser=Admin" \ - --data-urlencode "wtpass=${WT_ADMIN_PASS}" \ - -d "wtemail=admin@example.com" >/dev/null +$STD sudo -u www-data php /opt/webtrees/index.php config-ini \ + --dbhost=127.0.0.1 \ + --dbport=3306 \ + --dbuser=webtrees \ + --dbpass="${MARIADB_DB_PASS}" \ + --dbname=webtrees \ + --tblpfx=wt_ \ + --base-url="http://${LOCAL_IP}" +$STD sudo -u www-data php /opt/webtrees/index.php user Admin \ + --create \ + --real-name="Administrator" \ + --email="admin@example.com" \ + --password="${WT_ADMIN_PASS}" +$STD sudo -u www-data php /opt/webtrees/index.php user-setting Admin canadmin 1 cat <>~/webtrees.creds