From 4568a740dde7bd6224783bfacff40ec703ab3391 Mon Sep 17 00:00:00 2001 From: Joel Savitz Date: Mon, 22 Sep 2025 14:00:54 -0400 Subject: [PATCH] add daily_backup.sh from singularity Signed-off-by: Joel Savitz --- daily_backup.sh | 8 ++++++++ script-lint.sh | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 daily_backup.sh diff --git a/daily_backup.sh b/daily_backup.sh new file mode 100755 index 00000000..fa435f86 --- /dev/null +++ b/daily_backup.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Run this in the singularity repo + +while true; do + ./backup/backup.sh > "/var/backup/$(date +%s).tar.gz" + sleep 1d +done diff --git a/script-lint.sh b/script-lint.sh index 40b70a16..a2bb776d 100755 --- a/script-lint.sh +++ b/script-lint.sh @@ -18,9 +18,10 @@ shellcheck git/create-repo.sh shellcheck git/setup-repo.sh shellcheck git/cgi-bin/git-receive-pack shellcheck git/hooks/post-update +shellcheck daily_backup.sh # -x needed to make shellcheck follow `source` command shellcheck -x backup/backup.sh shellcheck -x backup/restore.sh -test "$(git ls-tree -r HEAD | grep -c '.*\.sh$')" -eq "13" || (echo "New script detected. Does it need to be added to script-lint?" && false) +test "$(git ls-tree -r HEAD | grep -c '.*\.sh$')" -eq "14" || (echo "New script detected. Does it need to be added to script-lint?" && false)