diff --git a/Mediaserver-setup-[advanced].md b/Mediaserver-setup-[advanced].md index 133a156..921277d 100644 --- a/Mediaserver-setup-[advanced].md +++ b/Mediaserver-setup-[advanced].md @@ -65,10 +65,10 @@ If you run into issues with the amount of storage available, then it is advised cleanup.sh: ``` #!/bin/bash -find /path/to/matterbridge/media -type d -mtime +30 -delete +find /path/to/matterbridge/media -mindepth 1 -mtime +30 -delete ``` -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. It may be helpful to look at the [`find` manual page](https://www.gnu.org/software/findutils/manual/html_node/find_html/index.html). +This will delete all downloaded content that is more than 30 days old (but not the media directory itself, due to the use of `-mindepth 1`). You should adjust the path and the max age to suit your own needs. It may be helpful to look at the [`find` manual page](https://www.gnu.org/software/findutils/manual/html_node/find_html/index.html). To run the script as the user running matterbridge, execute `crontab -e` and add the following line to the bottom of the file: ```