mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-10 21:26:46 +01:00
Webtrees: use PHP CLI for initial setup instead of curl to setup wizard (#14818)
This commit is contained in:
committed by
GitHub
parent
cf3d8f902c
commit
4da4a47eb7
+14
-16
@@ -47,23 +47,21 @@ systemctl enable -q --now php${PHP_VER}-fpm
|
|||||||
systemctl restart caddy
|
systemctl restart caddy
|
||||||
|
|
||||||
msg_info "Automating Webtrees Setup"
|
msg_info "Automating Webtrees Setup"
|
||||||
sleep 5
|
|
||||||
WT_ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c15)
|
WT_ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c15)
|
||||||
curl -sS -X POST "http://127.0.0.1/" \
|
$STD sudo -u www-data php /opt/webtrees/index.php config-ini \
|
||||||
-d "step=6" \
|
--dbhost=127.0.0.1 \
|
||||||
--data-urlencode "baseurl=http://${LOCAL_IP}" \
|
--dbport=3306 \
|
||||||
-d "lang=en-US" \
|
--dbuser=webtrees \
|
||||||
-d "dbtype=mysql" \
|
--dbpass="${MARIADB_DB_PASS}" \
|
||||||
-d "dbhost=127.0.0.1" \
|
--dbname=webtrees \
|
||||||
-d "dbport=3306" \
|
--tblpfx=wt_ \
|
||||||
-d "dbuser=webtrees" \
|
--base-url="http://${LOCAL_IP}"
|
||||||
--data-urlencode "dbpass=${MARIADB_DB_PASS}" \
|
$STD sudo -u www-data php /opt/webtrees/index.php user Admin \
|
||||||
-d "dbname=webtrees" \
|
--create \
|
||||||
-d "tblpfx=wt_" \
|
--real-name="Administrator" \
|
||||||
-d "wtname=Administrator" \
|
--email="admin@example.com" \
|
||||||
-d "wtuser=Admin" \
|
--password="${WT_ADMIN_PASS}"
|
||||||
--data-urlencode "wtpass=${WT_ADMIN_PASS}" \
|
$STD sudo -u www-data php /opt/webtrees/index.php user-setting Admin canadmin 1
|
||||||
-d "wtemail=admin@example.com" >/dev/null
|
|
||||||
|
|
||||||
cat <<EOF >>~/webtrees.creds
|
cat <<EOF >>~/webtrees.creds
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user