home · contact · privacy
Upgrade Raspi setup.
[config] / bullseye / other_files / prune_microblogpub.sh
1 #!/bin/sh
2 set -e
3 set -x
4 service microblogpub stop
5 microblogdir=/home/plom/testing.microblog.pub
6 cd "${microblogdir}"
7 cp -r data/microblogpub.db data/microblogpub.db.bak.$(date +%a)
8 su -lc "cd ${microblogdir} && poetry run inv prune-old-data" - plom
9 service microblogpub start
10 echo "last microblog pruning at $(date)" >> /home/plom/prune_log.txt