Update fusionpbx-maintenance.sh

This commit is contained in:
FusionPBX 2017-08-18 11:21:06 -06:00 committed by GitHub
parent 7e0513a0ec
commit 1a23b6822f
1 changed files with 9 additions and 0 deletions

View File

@ -35,6 +35,15 @@ fi
#delete from the database
#psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_fax_files WHERE fax_date < NOW() - INTERVAL '90 days'"
#delete call recordings older than 90 days
if [ .$switch_package = .true ]; then
find /var/lib/freeswitch/recordings/*/archive/* -name '*.wav -mtime +90 -exec rm {} \;
find /var/lib/freeswitch/recordings/*/archive/* -name '*.mp3' -mtime +90 -exec rm {} \;
else
find /usr/local/freeswitch/recordings/*/archive/* -name '*.wav -mtime +90 -exec rm {} \;
find /usr/local/freeswitch/recordings/*/archive/* -name '*.mp3' -mtime +90 -exec rm {} \;
fi
#delete voicemail older than 90 days
if [ .$switch_package = .true ]; then
echo ".";