#!/bin/sh -Cefux


set -Cefux


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


opt=
#opt=--dry-run


ssh npinc rw


rsync $opt -avhhhiHAXUS \
--exclude=debug \
--exclude=examples \
--exclude=man \
--exclude=empty \
--exclude=dev \
/root/files/fbsd/current/dist/univ/ \
npinc:/


rsync $opt -avhhhiHAXUS \
/root/files/fbsd/embedded/overlays/npinc/root/ \
npinc:/


rsync $opt -avhhhiHAXUS \
--exclude=python3.9 \
--exclude=ruby \
--exclude=man \
--exclude=doc \
--exclude=examples \
--exclude=info \
--exclude=licenses \
--exclude=locale \
--exclude=ri \
/root/files/fbsd/current/qemu/usr/local/ \
npinc:/usr/local/


rsync $opt -avhhhiHAXUS \
--exclude=.git \
'--exclude=*.xz' \
--exclude=httpd-static \
--exclude=lib-local-perl-module-patches \
/home/ketas/files/bbb/poe-daemon/ \
npinc:/root/poe-daemon/


ssh npinc 'chown -vvR root:wheel poe-daemon '\
'&& chgrp -vv poe poe-daemon/ssl/*.key '\
'&& chmod -vv g+r poe-daemon/ssl/*.key '\
'&& cd poe-daemon '\
'&& ln -svf config-client1.pl config.pl '\
'&& ro'
