Skip to content

Commit 628a8b4

Browse files
committed
Updated install script
1 parent 326b473 commit 628a8b4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

install.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,15 @@ fi
130130

131131
# Prepare Caddy
132132
apt install -y debian-keyring debian-archive-keyring apt-transport-https
133-
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
134-
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
133+
134+
# Only add Caddy repository if not already configured
135+
if [ ! -f /usr/share/keyrings/caddy-stable-archive-keyring.gpg ]; then
136+
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
137+
fi
138+
139+
if [ ! -f /etc/apt/sources.list.d/caddy-stable.list ]; then
140+
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
141+
fi
135142

136143
# Install Redis and Caddy and required tools
137144
apt-get update

0 commit comments

Comments
 (0)