2 # Someone's Mattermost maintenance scripts.
3 # Copyright (c) 2016-2024 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
4 # published under MIT-License
7 # mv to config.py.examle config.py + edit.
9 # consider running as cronjob
10 # 55 23 * * * (cd /home/someone/mattermost/priviledged/maintenance; python3 -Bu db.py |tee /tmp/maintenance_db.log; python3 -Bu fs.py echo ""; du -sch /srv/mattermost/data/* | tail)
13 # Mattermost Postgres-DB-Connect string.
14 # Needed priviledges: all.
15 dbconnstring = "host=... dbname=... user=... password=..."
17 # user-id of "@deleted_user" to map posts of deleted users to.
18 deleted_user_uid = 'dead0012345678901234567890'
20 # Path to data-directory.
21 fs_data_path = "/srv/mattermost/..."
23 # Rollback instead of committing at the end. Also dont remove any files or directories.
26 # OPTIONAL: delete ``AUTODELETE-*`` messages.
27 #softdel_autodelete = True
29 # OPTIONAL: soft-delete system messages.
30 #softdel_systemspam = True
32 # OPTIONAL: Enforce system policy? (likely only relevant vor mattermost.fsinf.at)
33 #enforce_system_policy = False