diff --git a/etc/systemd/system/matterbridge-cleanup.service b/etc/systemd/system/matterbridge-cleanup.service new file mode 100644 index 00000000..83c3a6cc --- /dev/null +++ b/etc/systemd/system/matterbridge-cleanup.service @@ -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 diff --git a/etc/systemd/system/matterbridge-cleanup.timer b/etc/systemd/system/matterbridge-cleanup.timer new file mode 100644 index 00000000..7a58aa26 --- /dev/null +++ b/etc/systemd/system/matterbridge-cleanup.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Run matterbridge cleanup every minute + +[Timer] +OnCalendar=*-*-* *:*:00 +OnBootSec=0 +Persistent=true + +[Install] +WantedBy=timers.target