cc-2055: switch to init.d

-allow install script to be created from any location (no hardcoded paths)
-make python install scripts return 1 on error
-daemon now started automatically on boot using rc.local autostart
-change all prints to logs instead
-create airtime-uninstall shell script (and remove pypo user in here)
-create pypo user in shell script
This commit is contained in:
martin 2011-06-01 12:32:42 -04:00
parent 079d9d36b0
commit 6ab5ac4582
23 changed files with 179 additions and 224 deletions

View file

@ -4,20 +4,29 @@
#return with a non-zero return value.
set -e
echo -e "\n******************************** Install Begin *********************************";
# Absolute path to this script
SCRIPT=`readlink -f $0`
# Absolute directory this script is in
SCRIPTPATH=`dirname $SCRIPT`
php airtime-install.php $@
echo -e "\n******************************** Install Begin *********************************"
echo "*** Pypo Installation ***"
#python ".__DIR__."/../python_apps/pypo/install/pypo-install.py
python ../python_apps/pypo/install/pypo-install.py
php ${SCRIPTPATH}/airtime-install.php $@
echo -e "\n*** Creating Pypo User ***"
python ${SCRIPTPATH}/../python_apps/create-pypo-user.py
echo -e "\n*** Pypo Installation ***"
python ${SCRIPTPATH}/../python_apps/pypo/install/pypo-install.py
#echo -e "\n*** Recorder Installation ***"
#python ${SCRIPTPATH}/../python_apps/show-recorder/install/recorder-install.py
#echo -e "\n*** Media Monitor Installation ***"
#python ${SCRIPTPATH}/../python_apps/pytag-fs/install/media-monitor-install.py
#echo "*** Recorder Installation ***"
#python ".__DIR__."/../python_apps/show-recorder/install/recorder-install.py
#python ../python_apps/show-recorder/install/recorder-install.py
sleep 4
airtime-check-system
echo -e "\n******************************* Install Complete *******************************";
echo -e "\n******************************* Install Complete *******************************"

View file

@ -123,7 +123,5 @@ AirtimeInstall::CreateSymlinksToUtils();
AirtimeInstall::CreateZendPhpLogFile();
//wait for 1.9.0 release
//echo PHP_EOL."*** Media Monitor Installation ***".PHP_EOL;
//system("python ".__DIR__."/../python_apps/pytag-fs/install/media-monitor-install.py");
/* FINISHED AIRTIME PHP INSTALLER */

27
install/airtime-uninstall Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
# Absolute path to this script
SCRIPT=`readlink -f $0`
# Absolute directory this script is in
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
#echo -e "\n*** Uninstalling Show Recorder ***"
#python ${SCRIPTPATH}/../python_apps/show-recorder/install/recorder-uninstall.py
#echo -e "\n*** Uninstalling Media Monitor ***"
#python ${SCRIPTPATH}/../python_apps/pytag-fs/install/media-monitor-uninstall.py
echo -e "\n*** Removing Pypo User ***"
python ${SCRIPTPATH}/../python_apps/remove-pypo-user.py
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)"
echo -e " and '/etc/airtime'(where the config files are stored).\n"

View file

@ -19,7 +19,6 @@ require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/constants.
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
echo PHP_EOL;
echo "******************************* Uninstall Begin ********************************".PHP_EOL;
echo "* Uninstalling Airtime ".AIRTIME_VERSION.PHP_EOL;
AirtimeInstall::UninstallPhpCode();
@ -81,18 +80,7 @@ if ($results == 0) {
# Disabled as this should be a manual process
#AirtimeInstall::DeleteFilesRecursive(AirtimeInstall::CONF_DIR_STORAGE);
echo PHP_EOL."*** Uninstalling Pypo ***".PHP_EOL;
$command = "python ".__DIR__."/../python_apps/pypo/install/pypo-uninstall.py";
system($command);
echo PHP_EOL."*** Uninstalling Show Recorder ***".PHP_EOL;
$command = "python ".__DIR__."/../python_apps/show-recorder/install/recorder-uninstall.py";
system($command);
//wait for 1.9.0 release
//echo PHP_EOL."*** Uninstalling Media Monitor ***".PHP_EOL;
//$command = "python ".__DIR__."/../python_apps/pytag-fs/install/media-monitor-uninstall.py";
//system($command);
#Disabled as this should be a manual process
#AirtimeIni::RemoveIniFiles();
@ -101,10 +89,4 @@ AirtimeInstall::RemoveSymlinks();
AirtimeInstall::UninstallBinaries();
AirtimeInstall::RemoveLogDirectories();
echo PHP_EOL;
echo "****************************** Uninstall Complete ******************************".PHP_EOL;
echo PHP_EOL;
echo "NOTE: To fully remove all Airtime files, you will also have to manually delete".PHP_EOL;
echo " the directories '".AirtimeInstall::CONF_DIR_STORAGE."'(where the media files are stored)".PHP_EOL;
echo " and '/etc/airtime'(where the config files are stored).".PHP_EOL;
echo PHP_EOL;
/* FINISHED AIRTIME PHP UNINSTALLER */