docker/mod/periodic/entrypoint.sh
2021-10-17 21:26:26 +03:00

26 lines
495 B
Bash
Executable File

#!/bin/bash
#
# How N days back to keep files
#
history=5
while :
do
# restart kurento after 24h
/bbb-restart-kms
# resync freeswitch
/bbb-resync-freeswitch
# delete presentations older than N days
find /var/bigbluebutton/ -maxdepth 1 -type d -name "*-*" -mtime +$history -exec rm -rf '{}' +
# delete recordings older than $RECORDING_MAX_AGE_DAYS
if [ "$ENABLE_RECORDING" == true ] && [ "$REMOVE_OLD_RECORDING" == true ]; then
/bbb-remove-old-recordings
fi
sleep 30m
done