check zip is installed first

Signed-off-by: Ciara Brennan <ciara.brennan@gmail.com>
This commit is contained in:
Ciara Brennan 2019-10-28 11:49:24 +00:00
parent d42ab1574b
commit 0ad6e887ac

@ -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