Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 81057fb39918357db08fa193a318494d > scriptlet

fusionpbx-pgsql-4.2.2-2.mga7.noarch.rpm

PREIN

/bin/sh
if [ -f /etc/freeswitch/autoload_configs/cidlookup.conf.xml ]
then
echo Let us do a backup of /etc/freeswitch/conf/autoload_configs/cidlookup.conf.xml
mv /etc/freeswitch/autoload_configs/cidlookup.conf.xml /etc/freeswitch/autoload_configs/cidlookup.conf.xml.bak.fusion
fi

if [ -f /etc/freeswitch/autoload_configs/switch.conf.xml ]
then
echo Let us do a backup of /etc/freeswitch/autoload_configs/switch.conf.xml
mv /etc/freeswitch/autoload_configs/switch.conf.xml /etc/freeswitch/autoload_configs/switch.conf.xml.bak.fusion
fi

if [ -f /etc/freeswitch/sip_profiles/internal.xml ]
then
echo Let us do a backup of /etc/freeswitch/sip_profiles/internal.xml
mv /etc/freeswitch/sip_profiles/internal.xml /etc/freeswitch/sip_profiles/internal.xml.bak.fusion
fi

if [ -f /etc/freeswitch/sip_profiles/external.xml ]
then
echo Let us do a backup of /etc/freeswitch/sip_profiles/external.xml
mv /etc/freeswitch/sip_profiles/internal.xml /etc/freeswitch/sip_profiles/external.xml.bak.fusion
fi

if [ -f /etc/freeswitch/autoload_configs/voicemail.conf.xml ]
then
echo Let us do a backup of /etc/freeswitch/autoload_configs/voicemail.conf.xml
mv /etc/freeswitch/autoload_configs/voicemail.conf.xml /etc/freeswitch/autoload_configs/voicemail.conf.xml.bak.fusion
fi

PREUN

/bin/sh
rm -f /etc/freeswitch/conf/autoload_configs/cidlookup.conf.xml

POSTIN

/bin/sh
cp -f /usr/share/fusionpbx/cidlookup.conf.xml /etc/freeswitch/autoload_configs/
cp -f /usr/share/fusionpbx/fusionpbx/includes/templates/conf/sip_profiles/internal.xml  /etc/freeswitch/sip_profiles/
cp -f /usr/share/fusionpbx/fusionpbx/includes/templates/conf/sip_profiles/external.xml  /etc/freeswitch/sip_profiles/
/bin/sed -i -e s,'<!-- <param name="core-db-dsn" value="dsn:username:password" /> -->','<param name="core-db-dsn" value="freeswitch:freeswitch:" />', /etc/freeswitch/autoload_configs/switch.conf.xml
/bin/sed -i -e s,'</settings>','<param name="odbc-dsn" value="freeswitch:freeswitch:"/></settings>', /etc/freeswitch/sip_profiles/internal.xml
/bin/sed -i -e s,'</settings>','<param name="odbc-dsn" value="freeswitch:freeswitch:"/></settings>', /etc/freeswitch/sip_profiles/external.xml
/bin/sed -i -e s,'<!--<param name="odbc-dsn" value="dsn:user:pass"/>-->','<param name="odbc-dsn" value="freeswitch:freeswitch:"/>', /etc/freeswitch/autoload_configs/voicemail.conf.xml

POSTUN

/bin/sh
mv /etc/freeswitch/conf/autoload_configs/cidlookup.conf.xml.bak /etc/freeswitch/conf/autoload_configs/cidlookup.conf.xml