Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
79efdcd4af
6 changed files with 82 additions and 54 deletions
|
@ -158,7 +158,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{
|
||||||
$liquidsopa_error_msg = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>';
|
$liquidsopa_error_msg = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>';
|
||||||
|
|
||||||
$this->setDecorators(array(
|
$this->setDecorators(array(
|
||||||
array('ViewScript', array('viewScript' => 'form/stream-setting-form.phtml', "stream_number"=>$stream_number, "liquidsoap_error_msg"=>$liquidsopa_error_msg))
|
array('ViewScript', array('viewScript' => 'form/stream-setting-form.phtml', "stream_number"=>$stream_number, "enabled"=>$enable->getValue(), "liquidsoap_error_msg"=>$liquidsopa_error_msg))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
$s_name = "s".$this->stream_number;
|
$s_name = "s".$this->stream_number;
|
||||||
?>
|
?>
|
||||||
<h3 class="collapsible-header <?php echo $this->stream_number != '1'?"close":""?>"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
|
<h3 class="collapsible-header <?php echo $this->stream_number == '1'?"close":""?>"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
|
||||||
<div class="stream-setting-content" <?php echo $this->stream_number != '1'?'style="display: none;':''?> id="<?=$s_name?>-config">
|
<div class="stream-setting-content" <?php echo $this->enabled == 0?'style="display: none;':''?> id="<?=$s_name?>-config">
|
||||||
<fieldset class="padded">
|
<fieldset class="padded">
|
||||||
<dl class="zend_form clearfix">
|
<dl class="zend_form clearfix">
|
||||||
<dd id="<?=$s_name?>Liquidsoap-error-msg-element" class="liquidsoap_status">
|
<dd id="<?=$s_name?>Liquidsoap-error-msg-element" class="liquidsoap_status">
|
||||||
|
|
|
@ -15,14 +15,17 @@ if [[ "$DEB" = "Status: install ok installed" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\n******************************** Install Begin *********************************"
|
|
||||||
|
|
||||||
# Absolute path to this script, e.g. /home/user/bin/foo.sh
|
# Absolute path to this script, e.g. /home/user/bin/foo.sh
|
||||||
SCRIPT=`readlink -f $0`
|
SCRIPT=`readlink -f $0`
|
||||||
# Absolute path this script is in, thus /home/user/bin
|
# Absolute path this script is in, thus /home/user/bin
|
||||||
SCRIPTPATH=`dirname $SCRIPT`
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
AIRTIMEROOT=$SCRIPTPATH/../
|
AIRTIMEROOT=$SCRIPTPATH/../
|
||||||
|
|
||||||
|
# Check if airtime exists already
|
||||||
|
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-installed-check.php $@
|
||||||
|
|
||||||
|
echo -e "\n******************************** Install Begin *********************************"
|
||||||
|
|
||||||
rm -rf "/usr/lib/airtime"
|
rm -rf "/usr/lib/airtime"
|
||||||
$AIRTIMEROOT/python_apps/python-virtualenv/virtualenv-install.sh
|
$AIRTIMEROOT/python_apps/python-virtualenv/virtualenv-install.sh
|
||||||
python $AIRTIMEROOT/python_apps/create-pypo-user.py
|
python $AIRTIMEROOT/python_apps/create-pypo-user.py
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
set_include_path(__DIR__.'/../../airtime_mvc/library' . PATH_SEPARATOR . get_include_path());
|
||||||
|
require_once('Zend/Loader/Autoloader.php');
|
||||||
//Pear classes.
|
//Pear classes.
|
||||||
set_include_path(__DIR__.'/../../airtime_mvc/library/pear' . PATH_SEPARATOR . get_include_path());
|
set_include_path(__DIR__.'/../../airtime_mvc/library/pear' . PATH_SEPARATOR . get_include_path());
|
||||||
require_once('DB.php');
|
require_once('pear/DB.php');
|
||||||
|
|
||||||
class AirtimeInstall
|
class AirtimeInstall
|
||||||
{
|
{
|
||||||
|
@ -467,4 +469,33 @@ class AirtimeInstall
|
||||||
exec("rm -f /usr/share/python-virtualenv/distribute-0.6.10.tar.gz");
|
exec("rm -f /usr/share/python-virtualenv/distribute-0.6.10.tar.gz");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function printUsage($opts)
|
||||||
|
{
|
||||||
|
$msg = $opts->getUsageMessage();
|
||||||
|
echo PHP_EOL."Usage: airtime-install [options]";
|
||||||
|
echo substr($msg, strpos($msg, "\n")).PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getOpts()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$autoloader = Zend_Loader_Autoloader::getInstance();
|
||||||
|
$opts = new Zend_Console_Getopt(
|
||||||
|
array(
|
||||||
|
'help|h' => 'Displays usage information.',
|
||||||
|
'overwrite|o' => 'Overwrite any existing config files.',
|
||||||
|
'preserve|p' => 'Keep any existing config files.',
|
||||||
|
'no-db|n' => 'Turn off database install.',
|
||||||
|
'reinstall|r' => 'Force a fresh install of this Airtime Version'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$opts->parse();
|
||||||
|
} catch (Zend_Console_Getopt_Exception $e) {
|
||||||
|
print $e->getMessage() .PHP_EOL;
|
||||||
|
AirtimeInstall::printUsage($opts);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return $opts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,58 +5,19 @@
|
||||||
* @license http://www.gnu.org/licenses/gpl.txt
|
* @license http://www.gnu.org/licenses/gpl.txt
|
||||||
*
|
*
|
||||||
* Checks if a previous version of Airtime is currently installed and upgrades Airtime if so.
|
* Checks if a previous version of Airtime is currently installed and upgrades Airtime if so.
|
||||||
* Performs a new install (new configs, database install) if a version of Airtime is not found.
|
* Performs a new install (new configs, database install) otherwise.
|
||||||
* If the current version is found to be installed the user is presented with the help menu and can
|
|
||||||
* choose -r to reinstall.
|
|
||||||
*/
|
*/
|
||||||
set_include_path(__DIR__.'/../../airtime_mvc/library' . PATH_SEPARATOR . get_include_path());
|
|
||||||
|
|
||||||
require_once(dirname(__FILE__).'/AirtimeIni.php');
|
require_once(dirname(__FILE__).'/AirtimeIni.php');
|
||||||
require_once(dirname(__FILE__).'/AirtimeInstall.php');
|
require_once(dirname(__FILE__).'/AirtimeInstall.php');
|
||||||
require_once(__DIR__.'/airtime-constants.php');
|
require_once(__DIR__.'/airtime-constants.php');
|
||||||
|
|
||||||
|
$opts = AirtimeInstall::getOpts();
|
||||||
AirtimeInstall::ExitIfNotRoot();
|
if ($opts == NULL) {
|
||||||
|
|
||||||
require_once('Zend/Loader/Autoloader.php');
|
|
||||||
$autoloader = Zend_Loader_Autoloader::getInstance();
|
|
||||||
|
|
||||||
function printUsage($opts)
|
|
||||||
{
|
|
||||||
$msg = $opts->getUsageMessage();
|
|
||||||
echo PHP_EOL."Usage: airtime-install [options]";
|
|
||||||
echo substr($msg, strpos($msg, "\n")).PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$opts = new Zend_Console_Getopt(
|
|
||||||
array(
|
|
||||||
'help|h' => 'Displays usage information.',
|
|
||||||
'overwrite|o' => 'Overwrite any existing config files.',
|
|
||||||
'preserve|p' => 'Keep any existing config files.',
|
|
||||||
'no-db|n' => 'Turn off database install.',
|
|
||||||
'reinstall|r' => 'Force a fresh install of this Airtime Version'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$opts->parse();
|
|
||||||
} catch (Zend_Console_Getopt_Exception $e) {
|
|
||||||
print $e->getMessage() .PHP_EOL;
|
|
||||||
printUsage($opts);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($opts->h)) {
|
|
||||||
printUsage($opts);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
$version = AirtimeInstall::GetVersionInstalled();
|
$version = AirtimeInstall::GetVersionInstalled();
|
||||||
// The current version is already installed.
|
|
||||||
if (isset($version) && ($version != false) && ($version == AIRTIME_VERSION) && !isset($opts->r)) {
|
|
||||||
echo "Airtime $version is already installed.".PHP_EOL;
|
|
||||||
printUsage($opts);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
// A previous version exists - if so, upgrade.
|
// A previous version exists - if so, upgrade.
|
||||||
if (isset($version) && ($version != false) && ($version < AIRTIME_VERSION) && !isset($opts->r)) {
|
if (isset($version) && ($version != false) && ($version < AIRTIME_VERSION) && !isset($opts->r)) {
|
||||||
echo "Airtime version $version found.".PHP_EOL;
|
echo "Airtime version $version found.".PHP_EOL;
|
||||||
|
@ -65,11 +26,6 @@ if (isset($version) && ($version != false) && ($version < AIRTIME_VERSION) && !i
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($version === false){
|
|
||||||
echo "A version of Airtime older than 1.7.0 detected, please upgrade to 1.7.0 first.\n";
|
|
||||||
echo "You will then be able to upgrade to 1.9.0 using this installer.\n";
|
|
||||||
exit(3);
|
|
||||||
}
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// The only way we get here is if we are doing a new install or a reinstall.
|
// The only way we get here is if we are doing a new install or a reinstall.
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
38
install_minimal/include/airtime-installed-check.php
Normal file
38
install_minimal/include/airtime-installed-check.php
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Airtime
|
||||||
|
* @copyright 2011 Sourcefabric O.P.S.
|
||||||
|
* @license http://www.gnu.org/licenses/gpl.txt
|
||||||
|
*
|
||||||
|
* Checks if a current version of Airtime is installed.
|
||||||
|
* If so, the user is presented with the help menu and can
|
||||||
|
* choose -r to reinstall.
|
||||||
|
*/
|
||||||
|
require_once(dirname(__FILE__).'/AirtimeInstall.php');
|
||||||
|
require_once(__DIR__.'/airtime-constants.php');
|
||||||
|
|
||||||
|
AirtimeInstall::ExitIfNotRoot();
|
||||||
|
|
||||||
|
$opts = AirtimeInstall::getOpts();
|
||||||
|
if ($opts == NULL) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($opts->h)) {
|
||||||
|
AirtimeInstall::printUsage($opts);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$version = AirtimeInstall::GetVersionInstalled();
|
||||||
|
// The current version is already installed.
|
||||||
|
if (isset($version) && ($version != false) && ($version == AIRTIME_VERSION) && !isset($opts->r)) {
|
||||||
|
echo "Airtime $version is already installed.".PHP_EOL;
|
||||||
|
AirtimeInstall::printUsage($opts);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($version === false){
|
||||||
|
echo "A version of Airtime older than 1.7.0 detected, please upgrade to 1.7.0 first.\n";
|
||||||
|
echo "You will then be able to upgrade to 1.9.0 using this installer.\n";
|
||||||
|
exit(3);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue