Przeglądaj źródła

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

Nicolas Meienberger 2 lat temu
rodzic
commit
f31b312c2d
1 zmienionych plików z 7 dodań i 1 usunięć
  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/*
 # copy from downloaded /traefik/*
 if [ -d "traefik" ]; then
 if [ -d "traefik" ]; then
-    rm -rf traefik
+    mv traefik traefik_old
 fi
 fi
 mkdir traefik
 mkdir traefik
 cp -r runtipi-"${LATEST_VERSION}"/traefik/* ./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
 # copy from downloaded /docker-compose.yml
 if [ -f "docker-compose.yml" ]; then
 if [ -f "docker-compose.yml" ]; then
     rm -f docker-compose.yml
     rm -f docker-compose.yml