From d1044f9e3b6a3e9dde36c21883f88ae0ab7a1b21 Mon Sep 17 00:00:00 2001 From: jp112sdl Date: Sun, 14 Nov 2021 20:06:56 +0100 Subject: [PATCH] fixes #51 --- src/addon/VERSION | 2 +- src/rc.d/jp-hb-devices-addon | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/addon/VERSION b/src/addon/VERSION index 760606e1..3659ea2f 100644 --- a/src/addon/VERSION +++ b/src/addon/VERSION @@ -1 +1 @@ -5.7 +5.8 diff --git a/src/rc.d/jp-hb-devices-addon b/src/rc.d/jp-hb-devices-addon index a65b95f3..2da97a1b 100755 --- a/src/rc.d/jp-hb-devices-addon +++ b/src/rc.d/jp-hb-devices-addon @@ -159,6 +159,11 @@ case "$1" in ### delete the old (current) addon directory and rename the newly uploaded if [ -d ${NEW_ADDON_DIR} ]; then if [ -d ${ADDON_DIR} ]; then + ### backup customized_firmware files in new addon directory, before deleting the old (current) one! + if [ "$(find ${CUSTOMIZED_FIRMWARE_DIR} -type f -iname '*.xml')" ]; then + echo "Copying customized firmware files to new addon directory" | tee -a $TMP_LOGFILE + cp ${CUSTOMIZED_FIRMWARE_DIR}/*.xml ${NEW_ADDON_DIR}/customized_firmware/ + fi echo "Deleting current addon directory " | tee $TMP_LOGFILE rm -rf ${ADDON_DIR} fi