Update mermaids.sh
This commit is contained in:
parent
35ab0d9667
commit
e2525f23fb
23
mermaids.sh
23
mermaids.sh
@ -129,15 +129,20 @@ log() { echo -e "${GREEN}[$(date +%H:%M:%S)]${NC} $1"; }
|
|||||||
PORT="${1:-80}"
|
PORT="${1:-80}"
|
||||||
|
|
||||||
# 1. Update & install Caddy + deps
|
# 1. Update & install Caddy + deps
|
||||||
log "Updating system..."
|
log "Updating package lists..."
|
||||||
apt-get clean -y
|
# Enable non-free for ufw (Debian 12 requirement)
|
||||||
rm -rf /var/lib/apt/lists/*
|
if grep -q "deb debianmain" /etc/apt/sources.list; then
|
||||||
apt-get update -o Acquire::Retries=3 || {
|
sed -i 's/deb \(.*\) main/deb \1 main non-free non-free-firmware/' /etc/apt/sources.list
|
||||||
warn "First apt-get update failed. Checking network..."
|
fi
|
||||||
cat /etc/resolv.conf
|
apt-get update -o Acquire::Retries=3
|
||||||
exit 1
|
|
||||||
}
|
log "Installing dependencies..."
|
||||||
apt-get install -y -qq wget ufw
|
apt-get install -y -qq \
|
||||||
|
wget \
|
||||||
|
ufw \
|
||||||
|
curl \
|
||||||
|
apt-transport-https \
|
||||||
|
ca-certificates
|
||||||
|
|
||||||
# 2. Download Mermaid (offline bundled)
|
# 2. Download Mermaid (offline bundled)
|
||||||
log "Downloading Mermaid v10.6.1 (offline)..."
|
log "Downloading Mermaid v10.6.1 (offline)..."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user