Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
4e0dfab596 PBS4-Upgrade: update current PBS3 packages before switching to Trixie repos 2026-05-30 21:41:16 +02:00
2 changed files with 29 additions and 14 deletions

View File

@@ -47,21 +47,23 @@ 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)
$STD sudo -u www-data php /opt/webtrees/index.php config-ini \ curl -sS -X POST "http://127.0.0.1/" \
--dbhost=127.0.0.1 \ -d "step=6" \
--dbport=3306 \ --data-urlencode "baseurl=http://${LOCAL_IP}" \
--dbuser=webtrees \ -d "lang=en-US" \
--dbpass="${MARIADB_DB_PASS}" \ -d "dbtype=mysql" \
--dbname=webtrees \ -d "dbhost=127.0.0.1" \
--tblpfx=wt_ \ -d "dbport=3306" \
--base-url="http://${LOCAL_IP}" -d "dbuser=webtrees" \
$STD sudo -u www-data php /opt/webtrees/index.php user Admin \ --data-urlencode "dbpass=${MARIADB_DB_PASS}" \
--create \ -d "dbname=webtrees" \
--real-name="Administrator" \ -d "tblpfx=wt_" \
--email="admin@example.com" \ -d "wtname=Administrator" \
--password="${WT_ADMIN_PASS}" -d "wtuser=Admin" \
$STD sudo -u www-data php /opt/webtrees/index.php user-setting Admin canadmin 1 --data-urlencode "wtpass=${WT_ADMIN_PASS}" \
-d "wtemail=admin@example.com" >/dev/null
cat <<EOF >>~/webtrees.creds cat <<EOF >>~/webtrees.creds

View File

@@ -50,6 +50,19 @@ 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)