diff --git a/helperFunctions.sh b/helperFunctions.sh index dd26d9e37..82ec906ab 100755 --- a/helperFunctions.sh +++ b/helperFunctions.sh @@ -102,9 +102,7 @@ openwbDebugLog() { export -f openwbDebugLog openwbRunLoggingOutput() { - functionName="$1" - shift - $functionName "$@" 2>&1 | while read -r line + "$@" 2>&1 | while read -r line do # use path to /var/log as link in ramdisk may not be set up yet! echo "$(date +"%Y-%m-%d %H:%M:%S"): $1: $line" >> "/var/log/openWB.log" diff --git a/runs/restore.sh b/runs/restore.sh index 625ac29f1..dccac44d6 100755 --- a/runs/restore.sh +++ b/runs/restore.sh @@ -28,8 +28,7 @@ LOGFILE="$OPENWBBASEDIR/web/tools/upload/restore.log" echo "****************************************" echo "Step 4: replacing old files..." # we use cp not mv because of not empty directories in destination - # dotglob is needed to include files and directories beginning with a dot - (shopt -s dotglob; sudo cp -v -p -r "${WORKINGDIR}${OPENWBBASEDIR}/"* "${OPENWBBASEDIR}/") + sudo cp -v -p -r "${WORKINGDIR}${OPENWBBASEDIR}/." "${OPENWBBASEDIR}/" echo "****************************************" echo "Step 5: restoring mosquitto db..." if [[ -f "${WORKINGDIR}${MOSQUITTODIR}/mosquitto.db" ]]; then diff --git a/web/settings/backup.php b/web/settings/backup.php index d1d0236c3..575eb5f06 100644 --- a/web/settings/backup.php +++ b/web/settings/backup.php @@ -1,10 +1,8 @@ diff --git a/web/settings/upload.php b/web/settings/upload.php index 3623b5623..a3dae56c6 100644 --- a/web/settings/upload.php +++ b/web/settings/upload.php @@ -139,7 +139,7 @@ function(data){