forked from cohabit/server_config
13 lines
533 B
Bash
13 lines
533 B
Bash
# Check if already installed
|
|
if [[ $(which caddy) != "/usr/bin/caddy" ]]; then
|
|
# Install prerequistes
|
|
nala install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
|
|
|
# Install sources and keys
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
|
|
fi
|
|
|
|
# Install or upgrade caddy
|
|
nala install -y caddy
|