Update fusionpbx-maintenance.sh
This commit is contained in:
parent
233646c6cb
commit
6849ec9725
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
#settings
|
||||
#export PGPASSWORD="zzz"
|
||||
#export PGPASSWORD="zzzzz"
|
||||
db_host=127.0.0.1
|
||||
db_port=5432
|
||||
switch_package=true # true or false
|
||||
|
|
@ -24,9 +24,11 @@ fi
|
|||
|
||||
#delete fax older than 90 days
|
||||
if [ .$switch_package = .true ]; then
|
||||
echo ".";
|
||||
#find /var/lib/freeswitch/storage/fax/* -name '*.tif' -mtime +90 -exec rm {} \;
|
||||
#find /var/lib/freeswitch/storage/fax/* -name '*.pdf' -mtime +90 -exec rm {} \;
|
||||
else
|
||||
echo ".";
|
||||
#find /usr/local/freeswitch/storage/fax/* -name '*.tif' -mtime +90 -exec rm {} \;
|
||||
#find /usr/local/freeswitch/storage/fax/* -name '*.pdf' -mtime +90 -exec rm {} \;
|
||||
fi
|
||||
|
|
@ -35,9 +37,11 @@ fi
|
|||
|
||||
#delete voicemail older than 90 days
|
||||
if [ .$switch_package = .true ]; then
|
||||
echo ".";
|
||||
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.wav' -mtime +90 -exec rm {} \;
|
||||
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.mp3' -mtime +90 -exec rm {} \;
|
||||
else
|
||||
echo ".";
|
||||
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.wav' -mtime +90 -exec rm {} \;
|
||||
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.mp3' -mtime +90 -exec rm {} \;
|
||||
fi
|
||||
|
|
@ -45,3 +49,5 @@ fi
|
|||
#delete call detail records older 90 days
|
||||
#psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_xml_cdr WHERE start_stamp < NOW() - INTERVAL '90 days'"
|
||||
|
||||
#completed message
|
||||
echo "Maintenance Completed";
|
||||
|
|
|
|||
Loading…
Reference in New Issue