diff --git a/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php index 888b0a7f9..41d35436e 100644 --- a/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.4/airtime-upgrade.php @@ -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();