Various fixes for installer
-create zendphp.log before web files are available -run airtime.php script earlier so DB is created before web files are available -zendphp.log should have 644 permissions, not 755
This commit is contained in:
parent
5aea66a5c4
commit
bb5deda09d
5 changed files with 31 additions and 25 deletions
|
@ -160,6 +160,19 @@ if [ "$DO_UPGRADE" -eq "1" ]; then
|
|||
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-upgrade.php $@
|
||||
fi
|
||||
|
||||
set +e
|
||||
if [ "$DO_UPGRADE" -eq "0" ]; then
|
||||
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-install.php $@
|
||||
result=$?
|
||||
|
||||
if [ "$result" -ne "0" ]; then
|
||||
#There was an error, exit with error code.
|
||||
echo "There was an error during install. Exit code $result"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
set -e
|
||||
|
||||
$SCRIPTPATH/include/airtime-copy-files.sh
|
||||
$SCRIPTPATH/include/airtime-initialize.sh $@
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ class AirtimeInstall
|
|||
// Put Propel sql files in Database
|
||||
//$command = AirtimeInstall::CONF_DIR_WWW."/library/propel/generator/bin/propel-gen ".AirtimeInstall::CONF_DIR_WWW."/build/ insert-sql 2>/dev/null";
|
||||
|
||||
$dir = AirtimeInstall::CONF_DIR_WWW."/build/sql/";
|
||||
$dir = self::GetAirtimeSrcDir()."/build/sql/";
|
||||
$files = array("schema.sql", "sequences.sql", "views.sql", "triggers.sql", "defaultdata.sql");
|
||||
|
||||
foreach ($files as $f){
|
||||
|
@ -453,7 +453,7 @@ class AirtimeInstall
|
|||
}
|
||||
|
||||
touch($file);
|
||||
chmod($file, 0755);
|
||||
chmod($file, 0644);
|
||||
chown($file, $CC_CONFIG['webServerUser']);
|
||||
chgrp($file, $CC_CONFIG['webServerUser']);
|
||||
}
|
||||
|
|
|
@ -35,11 +35,18 @@ AIRTIMEROOT=$SCRIPTPATH/../../
|
|||
|
||||
echo "* Creating /etc/airtime"
|
||||
mkdir -p /etc/airtime
|
||||
#if [ "$DO_UPGRADE" -eq "0" ]; then
|
||||
if [ ! -e /etc/airtime/airtime.conf ]; then
|
||||
#config file airtime.conf exists, but Airtime is not installed
|
||||
cp $AIRTIMEROOT/airtime_mvc/build/airtime.conf /etc/airtime
|
||||
fi
|
||||
|
||||
#if [ -e /etc/airtime/airtime.conf -a "$DO_UPGRADE" -eq "0" ]; then
|
||||
#config file airtime.conf exists, but Airtime is not installed
|
||||
# mv /etc/airtime/airtime.conf airtime.conf.bak
|
||||
# cp $AIRTIMEROOT/airtime_mvc/build/airtime.conf /etc/airtime
|
||||
#fi
|
||||
|
||||
|
||||
echo "* Creating /etc/monit/conf.d/monit-airtime-generic.cfg"
|
||||
mkdir -p /etc/monit/conf.d/
|
||||
if [ ! -e /etc/monit/conf.d/monit-airtime-generic.cfg ]; then
|
||||
|
@ -78,6 +85,13 @@ ln -sf /usr/lib/airtime/utils/airtime-log /usr/bin/airtime-log
|
|||
ln -sf /usr/lib/airtime/utils/airtime-test-soundcard /usr/bin/airtime-test-soundcard
|
||||
ln -sf /usr/lib/airtime/utils/airtime-test-stream /usr/bin/airtime-test-stream
|
||||
|
||||
echo "* Creating /var/log/airtime"
|
||||
mkdir -p /var/log/airtime
|
||||
chmod a+x /var/log/airtime
|
||||
touch /var/log/airtime/zendphp.log
|
||||
chown www-data:www-data /var/log/airtime/zendphp.log
|
||||
chmod 644 /var/log/airtime/zendphp.log
|
||||
|
||||
if [ "$web" = "t" ]; then
|
||||
echo "* Creating /usr/share/airtime"
|
||||
rm -rf "/usr/share/airtime"
|
||||
|
|
|
@ -14,22 +14,6 @@ SCRIPTPATH=`dirname $SCRIPT`
|
|||
|
||||
AIRTIMEROOT=$SCRIPTPATH/../../
|
||||
|
||||
#virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
||||
#. ${virtualenv_bin}activate
|
||||
|
||||
set +e
|
||||
if [ "$DO_UPGRADE" -eq "0" ]; then
|
||||
php --php-ini ${SCRIPTPATH}/../airtime-php.ini ${SCRIPTPATH}/airtime-install.php $@
|
||||
result=$?
|
||||
|
||||
if [ "$result" -ne "0" ]; then
|
||||
#There was an error, exit with error code.
|
||||
echo "There was an error during install. Exit code $result"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
set -e
|
||||
|
||||
if [ "$mediamonitor" = "t" ]; then
|
||||
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-initialize.py
|
||||
fi
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
* @package Airtime
|
||||
* @copyright 2011 Sourcefabric O.P.S.
|
||||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*
|
||||
* Checks if a previous version of Airtime is currently installed and upgrades Airtime if so.
|
||||
* Performs a new install (new configs, database install) otherwise.
|
||||
*/
|
||||
require_once(__DIR__.'/AirtimeIni.php');
|
||||
require_once(__DIR__.'/AirtimeInstall.php');
|
||||
|
@ -56,7 +53,7 @@ if ($overwrite) {
|
|||
}
|
||||
|
||||
// Update the build.properties file to point to the correct directory.
|
||||
AirtimeIni::UpdateIniValue(AirtimeInstall::CONF_DIR_WWW.'/build/build.properties', 'project.home', AirtimeInstall::CONF_DIR_WWW);
|
||||
//AirtimeIni::UpdateIniValue(AirtimeInstall::CONF_DIR_WWW.'/build/build.properties', 'project.home', AirtimeInstall::CONF_DIR_WWW);
|
||||
|
||||
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
|
||||
|
||||
|
@ -74,6 +71,4 @@ if ($db_install) {
|
|||
}
|
||||
}
|
||||
|
||||
AirtimeInstall::CreateZendPhpLogFile();
|
||||
|
||||
/* FINISHED AIRTIME PHP INSTALLER */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue