From 732f151ba891c293404a9821a636ed13fe1b9e77 Mon Sep 17 00:00:00 2001 From: ptr33 <94262565+ptr33@users.noreply.github.com> Date: Fri, 10 Dec 2021 23:25:34 +0100 Subject: [PATCH] Do not overwrite on install existing files If there is a dhem.cfg already in the install directory, do not overwrite it --- src/entry.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/entry.sh b/src/entry.sh index c9ce4d52..1dfd678c 100755 --- a/src/entry.sh +++ b/src/entry.sh @@ -160,7 +160,8 @@ if [ -d "/fhem" ]; then if [ "${FHEM_CLEANINSTALL}" = '1' ]; then echo "$i. Installing FHEM to ${FHEM_DIR}" shopt -s dotglob nullglob 2>&1>/dev/null - mv -f /fhem/* ${FHEM_DIR}/ 2>&1>/dev/null + # was mv -f -> -n do not overwrite existing files + mv -n /fhem/* ${FHEM_DIR}/ 2>&1>/dev/null cd ${FHEM_DIR} 2>&1>/dev/null echo 'http://fhem.de/fhemupdate/controls_fhem.txt' > ./FHEM/controls.txt mv ./controls_fhem.txt ./FHEM/ 2>&1>/dev/null