small enhancements

This commit is contained in:
buanet
2023-04-11 18:37:45 +02:00
parent 454287d078
commit be18293a5b
6 changed files with 45 additions and 12 deletions

View File

@@ -242,7 +242,16 @@ restore_iobroker() {
#chown -R $setuid:$setgid /opt/iobroker/backup
echo -n "Restoring ioBroker... "
set +e
bash iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1
return=$?
set -e
if [[ "$return" -ne 0 ]]; then
echo "Failed."
echo "For more details see \"/opt/iobroker/log/restore.log\"."
echo "Please check backup file location and permissions and try again."
return 1
fi
echo 'Done.'
echo ' '
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"