#!/bin/sh -Cefux


set -Cefux


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


opt=
#opt=--dry-run


rsync $opt -avhhhiHAXUS \
-delete --delete-excluded \
--no-owner \
--no-group \
--exclude=.git \
--exclude=httpd-static \
--exclude=check-js-func-order.sh \
--exclude=bbb-gpio-map.pl \
--exclude=README \
--exclude=.gitignore \
--exclude=config-client1.pl \
--exclude=etc \
'--exclude=*local-perl-module-patches' \
'--exclude=*test*.sh' \
'--exclude=*.xz' \
'--exclude=config.pl*' \
'--exclude=*.tpl' \
'--exclude=*.core' \
'--exclude=syslog*.sh' \
'--exclude=watchdog*.sh' \
'--exclude=config-*-test.pl' \
/home/ketas/files/bbb/poe-daemon/ \
/root/files/jails/limegreen/root/poe-daemon/


cd /root/files/jails/limegreen/root/poe-daemon/ssl || exit 1


for key_file in server.key client.key
do
	chgrp -vv nobody "$key_file"
	chmod -vv g+r    "$key_file"
done
