CC-2794: Upgrade script for 1.9.4

-fixed
This commit is contained in:
martin 2011-09-09 14:30:44 -04:00
parent ace98569ed
commit ca29263579

View file

@ -3,6 +3,7 @@
class Airtime194Upgrade{
const CONF_FILE_LIQUIDSOAP = "/etc/airtime/liquidsoap.cfg";
const CONF_FILE_AIRTIME = "/etc/airtime/airtime.conf";
const CONF_PYPO_GRP = "pypo";
public static function upgradeLiquidsoapCfgPerms(){
@ -10,6 +11,19 @@ class Airtime194Upgrade{
chgrp(self::CONF_FILE_LIQUIDSOAP, self::CONF_PYPO_GRP);
}
public static function InstallAirtimePhpServerCode($phpDir)
{
$AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc');
echo "* Installing PHP code to ".$phpDir.PHP_EOL;
exec("mkdir -p ".$phpDir);
exec("cp -R ".$AIRTIME_SRC."/* ".$phpDir);
}
}
$values = parse_ini_file(AirtimeIni194::CONF_FILE_AIRTIME, true);
$phpDir = $values['general']['airtime_dir'];
Airtime194Upgrade::InstallAirtimePhpServerCode($phpDir);
Airtime194Upgrade::upgradeLiquidsoapCfgPerms();