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