add rsync scripts and wg config

This commit is contained in:
2026-03-13 15:37:56 +01:00
parent 621661d9aa
commit 3c6b4f6f16
11 changed files with 768433 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
#!/bin/bash
BWLIMIT=2500
while [[ $# -gt 0 ]]; do
case $1 in
--bwlimit)
BWLIMIT="$2"
shift 2
;;
*)
shift
;;
esac
done
./reresolve-dns.sh
systemctl stop wg-quick@wg0
systemctl start wg-quick@wg0
#WENN wg show einen lange zurückliegenden handshake zeigt, muss der keepalive auf Serverseite verlängert werden
cd /home/ck/
echo syncing `pwd` `date`
source sync-accounts
for account in ${accounts[@]}; do
echo $account
source $account
# echo $(date "+%FT%T") >> /media/data/ncdata/data/$account/files/syncdate.txt
for folder in ${folders[@]}; do
echo $folder
rsync -auszv --progress --bwlimit=$BWLIMIT --password-file=rsyncpw --exclude-from="exclude-file" Christopher@server-haus-12b.home::Christopher/$account/files/$folder /media/data/ncdata/data/$account/files/
done
done
#echo $(date "+%FT%T") >> $logfile