mirror of
https://github.com/42wim/matterbridge.git
synced 2025-06-17 20:27:28 +02:00
Updated Mediaserver setup [advanced] (markdown)
parent
7e8c50595f
commit
ecc355b03f
@ -58,17 +58,21 @@ MediaDownloadPath="/var/www/matterbridge"
|
|||||||
MediaServerDownload="https://yourserver.com/matterbridge"
|
MediaServerDownload="https://yourserver.com/matterbridge"
|
||||||
```
|
```
|
||||||
|
|
||||||
When using the local download configuration, matterbridge does not clean up any of the content it downloads to the Mediaserver path. If you need to perform periodic clean up, then it should be done externally (i.e. via cron). An example cronjob and script are below:
|
When using the local download configuration, matterbridge does not clean up any of the content it downloads to the Mediaserver path.
|
||||||
|
## Sidenote
|
||||||
|
If you run into issues with the amount of storage availble, then it is advised to do an automated cleanup which is to be done externally (i.e. via cron). An example cronjob and script are below:
|
||||||
|
|
||||||
crontab:
|
Adding the cronjob:
|
||||||
|
Use your favorite text editing tool to add the below content to /etc/crontab
|
||||||
```
|
```
|
||||||
@daily /path/to/matterbridge/cleanup.sh
|
@daily /path/to/matterbridge/cleanup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The cronjob will now run cleanup.sh on a daily interval. The cleanup.sh needs to contain the following
|
||||||
cleanup.sh:
|
cleanup.sh:
|
||||||
```
|
```
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
find /var/www/matterbridge -type d -mtime +30 | xargs rm -rf
|
find /path/to/matterbridge -type d -mtime +30 | xargs rm -rf
|
||||||
```
|
```
|
||||||
|
|
||||||
This will delete all downloaded content that is more than 30 days old. You should adjust the path and the max age to suit your own needs.
|
This will delete all downloaded content that is more than 30 days old. You should adjust the path and the max age to suit your own needs.
|
Loading…
x
Reference in New Issue
Block a user