Browse code

BM-12701 Fix: remove etc tmp backup path if already exist before create new one

Anthony Prades authored on 11/01/2018 11:40:53
Showing 1 changed files
... ...
@@ -3,11 +3,14 @@
3 3
 DST_PATH=${dstPath}
4 4
 
5 5
 ETC_PATH=${DST_PATH}/etc
6
+if [ -e ${ETC_PATH} ]; then
7
+    rm -rf ${ETC_PATH}
8
+fi
6 9
 mkdir -p ${ETC_PATH}
7 10
 
8 11
 if [ -e /etc/bm ]; then
9 12
   echo "Protect /etc/bm"
10
-  cp -r /etc/bm ${ETC_PATH}/bm
13
+  cp -r /etc/bm ${ETC_PATH}
11 14
 fi
12 15
 
13 16
 if [ -e /etc/imapd.conf ]; then