From ce88d8cc252a330464c0a7f0162fc2aa99875e15 Mon Sep 17 00:00:00 2001 From: bel Date: Fri, 2 Jan 2026 08:16:16 -0700 Subject: [PATCH] lastns --- daily.d/lastn_clean.sh | 9 +++++++++ daily.d/lastn_core.sh | 10 ++++++++++ daily.d/lastn_gitea.sh | 10 ++++++++++ daily.d/lastn_jellyfin.sh | 10 ++++++++++ daily.d/lastn_ledger.sh | 10 ++++++++++ hourly.d/lastn_ledger.sh | 10 ++++++++++ hourly.d/timer.sh | 3 +++ hourly.d/transmission_trackers.sh | 4 ++++ minutely.d/drawful.sh | 0 minutely.d/nix.sh | 5 ++++- 10 files changed, 70 insertions(+), 1 deletion(-) create mode 100755 daily.d/lastn_clean.sh create mode 100755 daily.d/lastn_core.sh create mode 100755 daily.d/lastn_gitea.sh create mode 100755 daily.d/lastn_jellyfin.sh create mode 100755 daily.d/lastn_ledger.sh create mode 100755 hourly.d/lastn_ledger.sh create mode 100755 hourly.d/timer.sh create mode 100755 hourly.d/transmission_trackers.sh mode change 100644 => 100755 minutely.d/drawful.sh diff --git a/daily.d/lastn_clean.sh b/daily.d/lastn_clean.sh new file mode 100755 index 0000000..8e0e4e1 --- /dev/null +++ b/daily.d/lastn_clean.sh @@ -0,0 +1,9 @@ +#! /usr/bin/env bash + +now=$(date +%s) +for f in /volume1/video/FTP/2???.??.??.*; do + s=$(date -r "$f" +%s) + if ((now-s > 60*60*24)); then + rm -f "$f" + fi +done diff --git a/daily.d/lastn_core.sh b/daily.d/lastn_core.sh new file mode 100755 index 0000000..4188b17 --- /dev/null +++ b/daily.d/lastn_core.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env bash + +/var/services/homes/squeaky2x3/dev/mnt/home/Go/bin/lastn \ + -tmp=/volume1/video/FTP \ + -cmd=backup \ + -n=14 \ + -ns=daily \ + -root=/volume1/video/Bel/sync/Core \ + -store=files \ + -storeaddr=/volume1/homes/squeaky2x3/bin/backup/Core diff --git a/daily.d/lastn_gitea.sh b/daily.d/lastn_gitea.sh new file mode 100755 index 0000000..f352621 --- /dev/null +++ b/daily.d/lastn_gitea.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env bash + +/var/services/homes/squeaky2x3/dev/mnt/home/Go/bin/lastn \ + -tmp=/volume1/video/FTP \ + -cmd=backup \ + -n=14 \ + -ns=backup-daily \ + -root=/volume1/homes/squeaky2x3/services_docker/mounts/gitea-mnt \ + -store=files \ + -storeaddr=/volume1/homes/squeaky2x3/bin/backup/gitea-mnt diff --git a/daily.d/lastn_jellyfin.sh b/daily.d/lastn_jellyfin.sh new file mode 100755 index 0000000..23343a4 --- /dev/null +++ b/daily.d/lastn_jellyfin.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env bash + +/var/services/homes/squeaky2x3/dev/mnt/home/Go/bin/lastn \ + -tmp=/volume1/video/FTP \ + -cmd=backup \ + -n=14 \ + -ns=daily \ + -root=/volume1/homes/squeaky2x3/services_docker/mounts/jellyfin-mnt \ + -store=files \ + -storeaddr=/volume1/homes/squeaky2x3/bin/backup/jellyfin diff --git a/daily.d/lastn_ledger.sh b/daily.d/lastn_ledger.sh new file mode 100755 index 0000000..d105f5d --- /dev/null +++ b/daily.d/lastn_ledger.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env bash + +/var/services/homes/squeaky2x3/dev/mnt/home/Go/bin/lastn \ + -tmp=/volume1/video/FTP \ + -cmd=backup \ + -n=14 \ + -ns=daily \ + -root=/volume1/video/Bel/sync/Core/ledger \ + -store=files \ + -storeaddr=/volume1/homes/squeaky2x3/bin/backup/ledger diff --git a/hourly.d/lastn_ledger.sh b/hourly.d/lastn_ledger.sh new file mode 100755 index 0000000..c301116 --- /dev/null +++ b/hourly.d/lastn_ledger.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env bash + +/var/services/homes/squeaky2x3/dev/mnt/home/Go/bin/lastn \ + -tmp=/volume1/video/FTP \ + -cmd=backup \ + -n=48 \ + -ns=hourly \ + -root=/volume1/video/Bel/sync/Core/ledger \ + -store=files \ + -storeaddr=/volume1/homes/squeaky2x3/bin/backup/ledger diff --git a/hourly.d/timer.sh b/hourly.d/timer.sh new file mode 100755 index 0000000..ffcd485 --- /dev/null +++ b/hourly.d/timer.sh @@ -0,0 +1,3 @@ +#! /usr/bin/env bash + +su squeaky2x3 -c 'bash /volume1/homes/squeaky2x3/services/timer.d/timer.sh' diff --git a/hourly.d/transmission_trackers.sh b/hourly.d/transmission_trackers.sh new file mode 100755 index 0000000..9cf2b2b --- /dev/null +++ b/hourly.d/transmission_trackers.sh @@ -0,0 +1,4 @@ +#! /usr/bin/env bash + +cd /volume1/homes/squeaky2x3/bin/transmission_load_trackers.d/ +su squeaky2x3 -c 'bash ./do.sh' diff --git a/minutely.d/drawful.sh b/minutely.d/drawful.sh old mode 100644 new mode 100755 diff --git a/minutely.d/nix.sh b/minutely.d/nix.sh index 256d4aa..160c997 100755 --- a/minutely.d/nix.sh +++ b/minutely.d/nix.sh @@ -1,5 +1,8 @@ #! /usr/bin/env bash sudo bash -c ' - test -d /nix || ln -h /volume1/nix.3.d /nix + if ! [ -d /nix/var ]; then + rm -r /nix || true + ln -s /volume1/nix.3.d /nix + fi '