Merge pull request #454 from ciara1234/master

check zip is installed first before running backup
This commit is contained in:
evilsocket 2019-10-28 17:10:17 +01:00 committed by GitHub
commit 432d654cc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,11 @@ FILES_TO_BACKUP=(
/home/pi/.bashrc
)
if ! type "zip" >/dev/null 2>&1; then
echo "This script requires zip, please resolve and try again"
exit 1
fi
ping -c 1 "${UNIT_HOSTNAME}" >/dev/null || {
echo "@ unit ${UNIT_HOSTNAME} can't be reached, make sure it's connected and a static IP assigned to the USB interface."
exit 1