Verification if caddy is installed

This commit is contained in:
YannLS
2025-07-31 11:57:31 +02:00
parent 7d5843c2d6
commit 0267e15a5f

View File

@@ -70,7 +70,14 @@ echo "Socket Port: ${CHOSEN_PORTS[1]}"
echo "Installing Caddy web server..."
curl -fsSL https://dl.cloudsmith.io/public/caddy/stable/gpg.key | gpg --dearmor | tee /etc/apt/keyrings/caddy-stable.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/caddy-stable.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main" | tee /etc/apt/sources.list.d/caddy-stable.list
FILE="/etc/apt/sources.list.d/caddy-stable.list"
REPO="deb [signed-by=/etc/apt/keyrings/caddy-stable.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main"
if ! grep -Fxq "$REPO" "$FILE"; then
echo "$REPO" | tee "$LIST"
else
echo "Already have a caddy repository..."
fi
# Add admin.apxtri domain to /etc/hosts
if ! grep -q "admin.apxtri.farm.ants" /etc/hosts; then