systemd: add matterbridge-cleanup.{service,timer}

Resolves: #98
This commit is contained in:
Aminda Suomalainen 2021-11-21 17:11:26 +02:00
parent 13278214d1
commit 62573195d9
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,12 @@
[Unit]
Description=Matterbridge mediarepo cleanup for things older than a wekk
[Service]
Type=oneshot
ExecStart=/usr/bin/find /var/www/html/matterbridge -type f -cmin +10080 -delete
User=matterbridge
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,10 @@
[Unit]
Description=Run matterbridge cleanup every minute
[Timer]
OnCalendar=*-*-* *:*:00
OnBootSec=0
Persistent=true
[Install]
WantedBy=timers.target