Merge branch '1.9.1' into devel
Conflicts: VERSION airtime_mvc/application/configs/constants.php airtime_mvc/application/models/MusicDir.php install_full/ubuntu/airtime-full-install install_minimal/include/airtime-upgrade.php python_apps/api_clients/api_client.py python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py
This commit is contained in:
commit
c19b7f7c6e
8 changed files with 66 additions and 16 deletions
37
install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php
Normal file
37
install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
require_once(dirname(__FILE__).'/../../include/AirtimeInstall.php');
|
||||
class Airtime195Upgrade{
|
||||
|
||||
const CONF_FILE_LIQUIDSOAP = "/etc/airtime/liquidsoap.cfg";
|
||||
const CONF_FILE_AIRTIME = "/etc/airtime/airtime.conf";
|
||||
const CONF_PYPO_GRP = "pypo";
|
||||
|
||||
|
||||
public static function BackupHtaccess($phpDir){
|
||||
exec("mkdir -p /tmp");
|
||||
exec("cp $phpDir/public/.htaccess /tmp");
|
||||
}
|
||||
|
||||
public static function RestoreHtaccess($phpDir){
|
||||
exec("cp /tmp/.htaccess $phpDir/public/");
|
||||
exec("rm -f /tmp/.htaccess");
|
||||
}
|
||||
|
||||
public static function InstallAirtimePhpServerCode($phpDir)
|
||||
{
|
||||
self::BackupHtaccess($phpDir);
|
||||
|
||||
$AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc');
|
||||
|
||||
echo "* Installing PHP code to ".$phpDir.PHP_EOL;
|
||||
exec("rm -rf \"$phpDir\"");
|
||||
exec("mkdir -p $phpDir");
|
||||
exec("cp -R ".$AIRTIME_SRC."/* ".$phpDir);
|
||||
|
||||
self::RestoreHtaccess($phpDir);
|
||||
}
|
||||
}
|
||||
|
||||
$values = parse_ini_file(Airtime195Upgrade::CONF_FILE_AIRTIME, true);
|
||||
$phpDir = $values['general']['airtime_dir'];
|
||||
Airtime195Upgrade::InstallAirtimePhpServerCode($phpDir);
|
Loading…
Add table
Add a link
Reference in a new issue