#!/bin/bash
# 2026-10-20 裝 aaPanel：憑證由 /root/fse_panel.json 讀取，唔准寫死喺呢檔
set -e
cd /tmp
get() { python3 -c "import json,sys;print(json.load(open('/root/fse_panel.json'))['$1'])"; }
U=$(get panel_user); P=$(get panel_password); PT=$(get panel_port); SP=$(get panel_safe_path)
echo "開始裝 aaPanel（port $PT），日誌 /tmp/aa_install.log"
echo y | bash aa_en.sh aapanel -u "$U" -p "$P" -P "$PT" --safe-path "$SP"
