home · contact · privacy
Fix faulty filename as per systemd unit file reference.
[config] / bullseye / other_files / prune.sh
diff --git a/bullseye/other_files/prune.sh b/bullseye/other_files/prune.sh
new file mode 100644 (file)
index 0000000..8cfc385
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+set -x
+service microblogpub stop
+microblogdir=/home/plom/testing.microblog.pub
+cd "${microblogdir}"
+cp -r data/microblogpub.db data/microblogpub.db.bak.$(date +%a)
+su -lc "cd ${microblogdir} && poetry run inv prune-old-data" - plom
+service microblogpub start
+echo "last microblog pruning at $(date)" >> /home/plom/prune_log.txt