From 374f0ebe98f9ebc84065d800cc740e04cba2d4c0 Mon Sep 17 00:00:00 2001 From: strix Date: Thu, 17 Jul 2025 18:54:50 +0200 Subject: [PATCH] fix: stuff --- {main => master}/bin/update-backups.sh | 19 ------------------- {main => master}/crontab | 0 {main => master}/install.sh | 0 {nodes => node}/etc/rsyncd.conf | 3 +-- {nodes => node}/install.sh | 6 ++++-- 5 files changed, 5 insertions(+), 23 deletions(-) rename {main => master}/bin/update-backups.sh (53%) rename {main => master}/crontab (100%) rename {main => master}/install.sh (100%) rename {nodes => node}/etc/rsyncd.conf (72%) rename {nodes => node}/install.sh (99%) diff --git a/main/bin/update-backups.sh b/master/bin/update-backups.sh similarity index 53% rename from main/bin/update-backups.sh rename to master/bin/update-backups.sh index 5b1bca5..b2cb8a2 100755 --- a/main/bin/update-backups.sh +++ b/master/bin/update-backups.sh @@ -31,25 +31,6 @@ for host in $(cat /var/lib/sfbs/hosts | grep -v '#'); do --exclude="/mnt/*" \ --exclude="/media/*" \ --exclude="/var/lib/sfbs/backups/*" \ - --exclude="/home/*/.rustup/*" \ - --exclude="/home/*/*Cache*/*" \ - --exclude="/home/*/*cache*/*" \ - --exclude="/home/*/.cache*/*" \ - --exclude="/home/*/.gradle/*" \ - --exclude="/home/*/.nvm/*" \ - --exclude="/home/*/Downloads/*" \ - --exclude="/home/*/Trash/*" \ - --exclude="/home/*/.config/chromium/*" \ - --exclude="/home/*/.local/*/pnpm/*" \ - --exclude="/home/*/.local/*/gnome-boxes/*" \ - --exclude="/home/*/JetBrains/Toolbox/apps/*" \ - --exclude="/home/*/code/*/dist/*" \ - --exclude="/home/*/code/*/venv/*" \ - --exclude="/home/*/code/*/target/*" \ - --exclude="/home/*/code/*/vendor/*" \ - --exclude="/home/*/code/*/output/*" \ - --exclude="/home/*/code/*/build/*" \ - --exclude="/home/*/code/*/node_modules/*" \ "$backup_path" rm -rf "$latest_link" diff --git a/main/crontab b/master/crontab similarity index 100% rename from main/crontab rename to master/crontab diff --git a/main/install.sh b/master/install.sh similarity index 100% rename from main/install.sh rename to master/install.sh diff --git a/nodes/etc/rsyncd.conf b/node/etc/rsyncd.conf similarity index 72% rename from nodes/etc/rsyncd.conf rename to node/etc/rsyncd.conf index b580afe..85b6fdf 100644 --- a/nodes/etc/rsyncd.conf +++ b/node/etc/rsyncd.conf @@ -2,7 +2,6 @@ path = / comment = "Full file-system share for sbfs" read only = true -exclude = *.tar.old refuse options = delete -auth users = @guset:deny, sfbs:ro +auth users = @guest:deny, sfbs:ro secrets file = /var/lib/sfbs/rsync-auth \ No newline at end of file diff --git a/nodes/install.sh b/node/install.sh similarity index 99% rename from nodes/install.sh rename to node/install.sh index 22d9e6f..0ec1560 100755 --- a/nodes/install.sh +++ b/node/install.sh @@ -1,8 +1,10 @@ #!/bin/sh -cp ./etc/rsyncd.conf /etc/rsyncd.conf [ -d "/var/lib/sfbs" ] || mkdir -p /var/lib/sfbs [ -f "/var/lib/sfbs/rsync-password" ] || openssl rand -hex 16 > /var/lib/sfbs/rsync-password -chmod 600 /var/lib/sfbs/rsync-password [ -f "/var/lib/sfbs/rsync-auth" ] || (echo "sfbs:$(cat /var/lib/sfbs/rsync-password)" > /var/lib/sfbs/rsync-auth) + +cp ./etc/rsyncd.conf /etc/rsyncd.conf + +chmod 600 /var/lib/sfbs/rsync-password chmod 600 /var/lib/sfbs/rsync-auth \ No newline at end of file