소스 검색

Don't copy the config file to itself

Bob Mottram 9 년 전
부모
커밋
1e4298f204
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3
    1
      src/freedombone

+ 3
- 1
src/freedombone 파일 보기

@@ -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}')