update.sh: add checking if data-backup exists (#4793)

This commit is contained in:
Hacker-CB
2020-10-28 10:45:49 +01:00
committed by GitHub
parent 697955997a
commit 82f3d7d9bb
+7
View File
@@ -1,5 +1,12 @@
#!/bin/bash -e
if [ -d data-backup ]; then
echo "ERROR: Backup directory exists. May be previous restoring was failed?"
echo "1. Save 'data-backup' and 'data' dirs to safe location to make possibility to restore config later."
echo "2. Manually delete 'data-backup' dir and try again."
exit 1
fi
echo "Stopping Zigbee2MQTT..."
sudo systemctl stop zigbee2mqtt