#!/bin/sh -Ceux


set -Ceux


cd /root/files/fbsd/embedded || exit 1


opt=
#opt=--dry-run


if [ "${1:-}" = no-watchdog ]
then
	ssh npinc service watchdogd stop
fi


ssh npinc ./upgrade.sh pre


rsync $opt -avhhhiHAXUS \
--delete \
--exclude=/.snap \
rootfs/ \
npinc:/mnt/


ssh npinc ./upgrade.sh post
