CC-2794: Upgrade script for 1.9.4
-fixed
This commit is contained in:
parent
ace98569ed
commit
ca29263579
1 changed files with 14 additions and 0 deletions
|
@ -3,13 +3,27 @@
|
|||
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(){
|
||||
chmod(self::CONF_FILE_LIQUIDSOAP, 0640);
|
||||
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue