Explorar el Código

fix(install.sh): keep local certificate when updating

Nicolas Meienberger hace 2 años
padre
commit
f31b312c2d
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      scripts/install.sh

+ 7 - 1
scripts/install.sh

@@ -57,11 +57,17 @@ cp -r runtipi-"${LATEST_VERSION}"/templates/* ./templates
 
 # copy from downloaded /traefik/*
 if [ -d "traefik" ]; then
-    rm -rf traefik
+    mv traefik traefik_old
 fi
 mkdir traefik
 cp -r runtipi-"${LATEST_VERSION}"/traefik/* ./traefik
 
+if [ -d "traefik_old" && -d "traefik_old/tls" ]; then
+  ## move old traefik TLS config to new traefik config
+  cp -r traefik_old/tls traefik
+  rm -rf traefik_old
+fi
+
 # copy from downloaded /docker-compose.yml
 if [ -f "docker-compose.yml" ]; then
     rm -f docker-compose.yml