From 46af32415926714c1b3ec22da08bfff3ab3d12c9 Mon Sep 17 00:00:00 2001 From: zenfyr Date: Wed, 7 Jan 2026 01:36:15 +0700 Subject: [PATCH] add mastodon cleanup timer --- beeper/etc/systemd/system/mastodon-maintenance.service | 9 +++++++++ beeper/etc/systemd/system/mastodon-maintenance.timer | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 beeper/etc/systemd/system/mastodon-maintenance.service create mode 100644 beeper/etc/systemd/system/mastodon-maintenance.timer diff --git a/beeper/etc/systemd/system/mastodon-maintenance.service b/beeper/etc/systemd/system/mastodon-maintenance.service new file mode 100644 index 0000000..6a16c69 --- /dev/null +++ b/beeper/etc/systemd/system/mastodon-maintenance.service @@ -0,0 +1,9 @@ +[Unit] +Description=Mastodon Maintenance Service +Requires=mastodon-web.service + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/podman exec mastodon-web tootctl statuses remove --days 90 +ExecStart=/usr/bin/podman exec mastodon-web tootctl accounts cull diff --git a/beeper/etc/systemd/system/mastodon-maintenance.timer b/beeper/etc/systemd/system/mastodon-maintenance.timer new file mode 100644 index 0000000..2626c3f --- /dev/null +++ b/beeper/etc/systemd/system/mastodon-maintenance.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Mastodon monthly maintenance + +[Timer] +OnCalendar=monthly +Persistent=true + +[Install] +WantedBy=timers.target