Update mermaids.sh
This commit is contained in:
parent
6a1526d6c0
commit
31e0c7020d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user