Skip to content

Commit

Permalink
Do not overwrite on install existing files
Browse files Browse the repository at this point in the history
If there is a dhem.cfg already in the install directory, do not overwrite it
  • Loading branch information
ptr33 authored Dec 10, 2021
1 parent b7d7017 commit 732f151
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 732f151

Please sign in to comment.