Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
1221c68227 Webtrees: use PHP CLI for initial setup instead of curl to setup wizard 2026-05-30 21:44:58 +02:00
2 changed files with 14 additions and 29 deletions

View File

@@ -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

View File

@@ -50,19 +50,6 @@ start_routines() {
no) msg_error "Selected no to Backup" ;; no) msg_error "Selected no to Backup" ;;
esac esac
# --- Update Current PBS 3 System ---
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 3 UPDATE" --menu \
"\nUpdate current PBS 3 (Bookworm) packages before upgrade?" 14 58 2 "yes" " " "no" " " 3>&2 2>&1 1>&3)
case $CHOICE in
yes)
msg_info "Updating current PBS 3 packages"
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
msg_ok "Updated current PBS 3 packages"
;;
no) msg_error "Skipped updating current packages" ;;
esac
# --- Debian 13 Sources --- # --- Debian 13 Sources ---
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 4 SOURCES" --menu \ CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS 4 SOURCES" --menu \
"Switch to Debian 13 (Trixie) sources for PBS 4?" 14 58 2 "yes" " " "no" " " 3>&2 2>&1 1>&3) "Switch to Debian 13 (Trixie) sources for PBS 4?" 14 58 2 "yes" " " "no" " " 3>&2 2>&1 1>&3)