X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=bullseye%2Fother_files%2Fprune_microblogpub.sh;fp=bullseye%2Fother_files%2Fprune_microblogpub.sh;h=8cfc385f6bced625d39f9ad3e7bc8ef3720f77f3;hb=be700ff9e26fbe05a6e70d50ca636c22b0f741fe;hp=0000000000000000000000000000000000000000;hpb=93690d8d437b328fe568a5502239ab27ae60e974;p=config
diff --git a/bullseye/other_files/prune_microblogpub.sh b/bullseye/other_files/prune_microblogpub.sh
new file mode 100644
index 0000000..8cfc385
--- /dev/null
+++ b/bullseye/other_files/prune_microblogpub.sh
@@ -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