Something went wrong. Try again.
forked from libreqoe/libreqos
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829#!/bin/bashset -euo pipefail
if [ "$(id -u)" -ne 0 ]; then echo "install_caddy.sh must be run as root." >&2 exit 1fi
export DEBIAN_FRONTEND=noninteractive
if command -v caddy >/dev/null 2>&1; then echo "Caddy is already installed." exit 0fi
apt-get updateapt-get install -y debian-keyring debian-archive-keyring apt-transport-https curl gnupg
install -d -m 0755 /usr/share/keyringscurl -fsSL https://dl.cloudsmith.io/public/caddy/stable/gpg.key \ | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpgcurl -fsSL https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt \ -o /etc/apt/sources.list.d/caddy-stable.list
apt-get updateapt-get install -y caddy
echo "Caddy installation complete."