Explorar el Código

Don't copy the config file to itself

Bob Mottram hace 9 años
padre
commit
1e4298f204
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      src/freedombone

+ 3
- 1
src/freedombone Ver fichero

@@ -814,7 +814,9 @@ function read_configuration {
814 814
 
815 815
   if [ -f $CONFIGURATION_FILE ]; then
816 816
       # Ensure that a copy of the config exists for upgrade purposes
817
-      cp $CONFIGURATION_FILE /root/freedombone.cfg
817
+      if [[ $CONFIGURATION_FILE != '/root/freedombone.cfg' ]]; then
818
+          cp $CONFIGURATION_FILE /root/freedombone.cfg
819
+      fi
818 820
 
819 821
       if grep -q "LETSENCRYPT_SERVER" $CONFIGURATION_FILE; then
820 822
           LETSENCRYPT_SERVER=$(grep "LETSENCRYPT_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')