From 9bfffe868f85c21a13a3f9d08f00eb84941b9c48 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 21 Nov 2024 16:19:49 +0100 Subject: [PATCH] multi-execution fix --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index fbd1fb4..a2434b2 100755 --- a/install.sh +++ b/install.sh @@ -12,6 +12,8 @@ openssl genrsa -out /etc/ssl/private/$APP.key 2048 openssl req -new -key /etc/ssl/private/$APP.key -out /etc/ssl/certs/$APP.csr -config openssl.cnf openssl x509 -req -in /etc/ssl/certs/$APP.csr -CA /root/ca.crt -CAkey /root/ca.key -CAcreateserial -out /etc/ssl/certs/$APP.crt -extfile openssl.cnf -extensions req_ext -days 500 -sha256 cp nginx.cnf /etc/nginx/sites-enabled/$APP -echo $DNS | tee -a /etc/bind/named.conf.local +if ! grep -q "$DNS" /etc/bind/named.conf.local; then + echo "$DNS" | tee -a /etc/bind/named.conf.local +fi cp zonefile.cnf /etc/bind/db.$DOMAIN docker run -p 5000:5000 --name $APP --restart always -d $APP