CC-3836: On install, If Airtime is not previously installed, overwrite files in /etc/airtime

-done
This commit is contained in:
Martin Konecny 2012-05-16 12:57:11 -04:00
parent fd70768910
commit f052c121e1
2 changed files with 10 additions and 1 deletions

View File

@ -125,6 +125,15 @@ set -e
DO_UPGRADE="0"
if [ "$result" -eq "0" ]; then
echo " * None found."
#Make sure any straggler config files are removed. Reason for this is that they may be from
#an older version of Airtime, but since there no database installed, we have no idea how to
#handle these (what version are they from?).
rm -f "/etc/airtime/airtime.conf"
rm -f "/etc/airtime/api_client.cfg"
rm -f "/etc/airtime/liquidsoap.cfg"
rm -f "/etc/airtime/media-monitor.cfg"
rm -f "/etc/airtime/pypo.cfg"
elif [ "$result" -eq "1" -a "$reinstall" = "f" ]; then
echo " * Same version of Airtime already installed!"
exit 1;

View File

@ -17,7 +17,7 @@ AirtimeInstall::ExitIfNotRoot();
if (!file_exists('/etc/airtime/airtime.conf')) {
#airtime.conf doesn't exist, and we need it to connect to database
#Assume Airtime is not installed.
return 0;
exit(0);
}
require_once(AirtimeInstall::GetAirtimeSrcDir()."/application/configs/db-conf.php");