Browse Source

Don't copy the config file to itself

Bob Mottram 9 years ago
parent
commit
1e4298f204
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/freedombone

+ 3
- 1
src/freedombone View File

814
 
814
 
815
   if [ -f $CONFIGURATION_FILE ]; then
815
   if [ -f $CONFIGURATION_FILE ]; then
816
       # Ensure that a copy of the config exists for upgrade purposes
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
       if grep -q "LETSENCRYPT_SERVER" $CONFIGURATION_FILE; then
821
       if grep -q "LETSENCRYPT_SERVER" $CONFIGURATION_FILE; then
820
           LETSENCRYPT_SERVER=$(grep "LETSENCRYPT_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
822
           LETSENCRYPT_SERVER=$(grep "LETSENCRYPT_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')