From f052c121e1c75ccc5e087e76c64f781336de9d8e Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 16 May 2012 12:57:11 -0400 Subject: [PATCH] CC-3836: On install, If Airtime is not previously installed, overwrite files in /etc/airtime -done --- install_minimal/airtime-install | 9 +++++++++ install_minimal/include/airtime-installed-check.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/install_minimal/airtime-install b/install_minimal/airtime-install index 45be0bb9f..467c021a5 100755 --- a/install_minimal/airtime-install +++ b/install_minimal/airtime-install @@ -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; diff --git a/install_minimal/include/airtime-installed-check.php b/install_minimal/include/airtime-installed-check.php index f65f44bbf..003a3ced3 100644 --- a/install_minimal/include/airtime-installed-check.php +++ b/install_minimal/include/airtime-installed-check.php @@ -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");