From 31e0c7020d8b8acd5662c9d0ac9def9676686e37 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 17 Apr 2026 09:59:54 +0800 Subject: [PATCH] Update mermaids.sh --- mermaids.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mermaids.sh b/mermaids.sh index c87b102..4d88880 100644 --- a/mermaids.sh +++ b/mermaids.sh @@ -133,6 +133,7 @@ warn() { echo -e "${YELLOW}[$(date +%H:%M:%S)]${NC} $1"; } die() { echo -e "${RED}[$(date +%H:%M:%S)]${NC} $1"; exit 1; } PORT="${1:-80}" +ROOT_PASSWORD="${2:-mermaid}" # === Now run operations === log "Installing dependencies..." @@ -253,13 +254,13 @@ if [[ -z "$IP" ]]; then IP=$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') fi log "URL: ${BLUE}http://${IP}:${PORT}${NC}" -log "Root password: ${YELLOW}$LXC_ROOT_PASSWORD${NC}" +log "Root password: ${YELLOW}$ROOT_PASSWORD${NC}" log "SSH: ssh root@${IP}" EOF # Push & run install script pct push $LXC_ID /tmp/mermaid-install.sh /root/mermaid-install.sh || die "Failed to push script" -pct exec $LXC_ID -- bash /root/mermaid-install.sh "$LXC_PORT" || die "Install failed" +pct exec $LXC_ID -- bash /root/mermaid-install.sh "$LXC_PORT" "$LXC_ROOT_PASSWORD" || die "Install failed" # Cleanup rm -f /tmp/mermaid-install.sh