CC-2410: Clean up install process
-reduced number of messages -got rid of some warnings. -moved airtime-install.php, airtime-upgrade.php, airtime-uninstall.php
This commit is contained in:
parent
9744507078
commit
fe14113b58
|
@ -14,7 +14,7 @@ echo -e "\n******************************** Install Begin **********************
|
|||
echo -e "\n*** Creating Pypo User ***"
|
||||
python ${SCRIPTPATH}/../python_apps/create-pypo-user.py
|
||||
|
||||
php ${SCRIPTPATH}/airtime-install.php $@
|
||||
php ${SCRIPTPATH}/include/airtime-install.php $@
|
||||
|
||||
echo -e "\n*** Pypo Installation ***"
|
||||
python ${SCRIPTPATH}/../python_apps/pypo/install/pypo-install.py
|
||||
|
|
|
@ -11,8 +11,6 @@ SCRIPTPATH=`dirname $SCRIPT`
|
|||
|
||||
echo -e "\n******************************* Uninstall Begin ********************************"
|
||||
|
||||
php ${SCRIPTPATH}/airtime-uninstall.php
|
||||
|
||||
echo -e "\n*** Uninstalling Pypo ***"
|
||||
python ${SCRIPTPATH}/../python_apps/pypo/install/pypo-uninstall.py
|
||||
|
||||
|
@ -25,6 +23,9 @@ python ${SCRIPTPATH}/../python_apps/media-monitor/install/media-monitor-uninstal
|
|||
echo -e "\n*** Removing Pypo User ***"
|
||||
python ${SCRIPTPATH}/../python_apps/remove-pypo-user.py
|
||||
|
||||
php ${SCRIPTPATH}/include/airtime-uninstall.php
|
||||
|
||||
|
||||
echo -e "\n****************************** Uninstall Complete ******************************\n"
|
||||
echo "NOTE: To fully remove all Airtime files, you will also have to manually delete"
|
||||
echo " the directories '/srv/airtime'(default storage location of media files)"
|
||||
|
|
|
@ -88,6 +88,10 @@ class AirtimeIni
|
|||
}
|
||||
}
|
||||
|
||||
public static function RemoveMonitFile(){
|
||||
unlink("/etc/monit/conf.d/airtime-monit.cfg");
|
||||
}
|
||||
|
||||
/**
|
||||
* This function removes /etc/airtime and the configuration
|
||||
* files present within it.
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
* Performs a new install (new configs, database install) if a version of Airtime is not found
|
||||
* 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());
|
||||
set_include_path(__DIR__.'/../../airtime_mvc/library' . PATH_SEPARATOR . get_include_path());
|
||||
|
||||
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
||||
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
|
||||
require_once(dirname(__FILE__).'/AirtimeIni.php');
|
||||
require_once(dirname(__FILE__).'/AirtimeInstall.php');
|
||||
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/constants.php');
|
||||
|
||||
AirtimeInstall::ExitIfNotRoot();
|
|
@ -5,8 +5,8 @@
|
|||
* @license http://www.gnu.org/licenses/gpl.txt
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
||||
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
|
||||
require_once(dirname(__FILE__).'/AirtimeIni.php');
|
||||
require_once(dirname(__FILE__).'/AirtimeInstall.php');
|
||||
// Need to check that we are superuser before running this.
|
||||
AirtimeInstall::ExitIfNotRoot();
|
||||
|
||||
|
@ -88,5 +88,6 @@ if ($results == 0) {
|
|||
AirtimeInstall::RemoveSymlinks();
|
||||
AirtimeInstall::UninstallBinaries();
|
||||
AirtimeInstall::RemoveLogDirectories();
|
||||
AirtimeIni::RemoveMonitFile();
|
||||
|
||||
/* FINISHED AIRTIME PHP UNINSTALLER */
|
|
@ -9,6 +9,7 @@
|
|||
//Pear classes.
|
||||
set_include_path(__DIR__.'/../airtime_mvc/library/pear' . PATH_SEPARATOR . get_include_path());
|
||||
require_once('DB.php');
|
||||
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
||||
|
||||
if(exec("whoami") != "root"){
|
||||
echo "Must be root user.\n";
|
||||
|
@ -99,5 +100,7 @@ passthru("python ".__DIR__."/../python_apps/show-recorder/install/recorder-insta
|
|||
echo PHP_EOL."*** Updating Media Monitor ***".PHP_EOL;
|
||||
passthru("python ".__DIR__."/../python_apps/media-monitor/install/media-monitor-install.py");
|
||||
|
||||
AirtimeIni::CreateMonitFile();
|
||||
|
||||
|
||||
echo "******************************* Update Complete *******************************".PHP_EOL;
|
|
@ -82,7 +82,6 @@ $values = parse_ini_file(CONF_FILE_AIRTIME, true);
|
|||
$phpDir = $values['general']['airtime_dir'];
|
||||
|
||||
InstallPhpCode($phpDir);
|
||||
AirtimeIni::CreateMonitFile();
|
||||
|
||||
//update utils (/usr/lib/airtime) folder
|
||||
UninstallBinaries();
|
||||
|
|
|
@ -69,7 +69,7 @@ try:
|
|||
print "Installing media-monitor daemon"
|
||||
shutil.copy(config["bin_dir"]+"/airtime-media-monitor-init-d", "/etc/init.d/airtime-media-monitor")
|
||||
|
||||
p = Popen("update-rc.d airtime-media-monitor defaults", shell=True)
|
||||
p = Popen("update-rc.d airtime-media-monitor defaults >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
print "Waiting for processes to start..."
|
||||
|
|
|
@ -29,7 +29,7 @@ try:
|
|||
|
||||
os.system("/etc/init.d/airtime-media-monitor stop")
|
||||
os.system("rm -f /etc/init.d/airtime-media-monitor")
|
||||
os.system("update-rc.d -f airtime-media-monitor remove")
|
||||
os.system("update-rc.d -f airtime-media-monitor remove >/dev/null 2>&1")
|
||||
|
||||
print "Removing log directories"
|
||||
remove_path(config["log_dir"])
|
||||
|
|
|
@ -106,7 +106,7 @@ try:
|
|||
print "Installing pypo daemon"
|
||||
shutil.copy(config["bin_dir"]+"/bin/airtime-playout-init-d", "/etc/init.d/airtime-playout")
|
||||
|
||||
p = Popen("update-rc.d airtime-playout defaults", shell=True)
|
||||
p = Popen("update-rc.d airtime-playout defaults >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
print "Waiting for processes to start..."
|
||||
|
|
|
@ -29,7 +29,7 @@ try:
|
|||
|
||||
os.system("/etc/init.d/airtime-playout stop")
|
||||
os.system("rm -f /etc/init.d/airtime-playout")
|
||||
os.system("update-rc.d -f airtime-playout remove")
|
||||
os.system("update-rc.d -f airtime-playout remove >/dev/null 2>&1")
|
||||
|
||||
print "Removing cache directories"
|
||||
remove_path(config["cache_base_dir"])
|
||||
|
|
|
@ -66,7 +66,7 @@ try:
|
|||
print "Installing show-recorder daemon"
|
||||
shutil.copy(config["bin_dir"]+"/airtime-show-recorder-init-d", "/etc/init.d/airtime-show-recorder")
|
||||
|
||||
p = Popen("update-rc.d airtime-show-recorder defaults", shell=True)
|
||||
p = Popen("update-rc.d airtime-show-recorder defaults >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
print "Waiting for processes to start..."
|
||||
|
|
|
@ -29,7 +29,7 @@ try:
|
|||
|
||||
os.system("/etc/init.d/airtime-show-recorder stop")
|
||||
os.system("rm -f /etc/init.d/airtime-show-recorder")
|
||||
os.system("update-rc.d -f airtime-show-recorder remove")
|
||||
os.system("update-rc.d -f airtime-show-recorder remove >/dev/null 2>&1")
|
||||
|
||||
print "Removing log directories"
|
||||
remove_path(config["log_dir"])
|
||||
|
|
Loading…
Reference in New Issue