CC-2758: Make airtime-install script Debian/Ubuntu compatible
-fixes
This commit is contained in:
parent
7496d26032
commit
cf4f151302
9 changed files with 201 additions and 123 deletions
|
@ -15,7 +15,6 @@ if [[ "$DEB" = "Status: install ok installed" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#Check whether version of virtualenv is <= 1.4.8. If so exit install.
|
#Check whether version of virtualenv is <= 1.4.8. If so exit install.
|
||||||
BAD_VERSION="1.4.8"
|
BAD_VERSION="1.4.8"
|
||||||
VERSION=$(virtualenv --version)
|
VERSION=$(virtualenv --version)
|
||||||
|
@ -33,19 +32,19 @@ fi
|
||||||
|
|
||||||
echo -e "\n******************************** Install Begin *********************************"
|
echo -e "\n******************************** Install Begin *********************************"
|
||||||
|
|
||||||
# Absolute path to this script
|
# Absolute path to this script, e.g. /home/user/bin/foo.sh
|
||||||
SCRIPT=`readlink -f $0`
|
SCRIPT=`readlink -f $0`
|
||||||
# Absolute directory this script is in
|
# Absolute path this script is in, thus /home/user/bin
|
||||||
SCRIPTPATH=`dirname $SCRIPT`
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
|
||||||
${SCRIPTPATH}/../python_apps/python-virtualenv/virtualenv-install.sh
|
python $SCRIPTPATH/../python_apps/create-pypo-user.py
|
||||||
|
|
||||||
|
$SCRIPTPATH/include/airtime-copy-files.sh
|
||||||
|
|
||||||
|
${SCRIPTPATH}/../python_apps/python-virtualenv/virtualenv-install.sh
|
||||||
virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
||||||
. ${virtualenv_bin}activate
|
. ${virtualenv_bin}activate
|
||||||
|
|
||||||
echo -e "\n*** Creating Pypo User ***"
|
|
||||||
python ${SCRIPTPATH}/../python_apps/create-pypo-user.py
|
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-install.php $@
|
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-install.php $@
|
||||||
result=$?
|
result=$?
|
||||||
|
@ -57,35 +56,32 @@ if [ "$result" -ne "0" ]; then
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo -e "\n*** API Client Installation ***"
|
python $SCRIPTPATH/../python_apps/pypo/install/pypo-initialize.py
|
||||||
python ${SCRIPTPATH}/../python_apps/api_clients/install/api_client_install.py
|
python $SCRIPTPATH/../python_apps/media-monitor/install/media-monitor-initialize.py
|
||||||
|
python $SCRIPTPATH/../python_apps/show-recorder/install/recorder-initialize.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/media-monitor/install/media-monitor-install.py
|
|
||||||
|
|
||||||
python ${SCRIPTPATH}/../python_apps/icecast2/install/icecast2-install.py
|
|
||||||
|
|
||||||
# Start monit if it is not running, or restart if it is.
|
# Start monit if it is not running, or restart if it is.
|
||||||
# Need to ensure monit is running before Airtime daemons are run. This is
|
# Need to ensure monit is running before Airtime daemons are run. This is
|
||||||
# so we can ensure they can register with monit to monitor them when they start.
|
# so we can ensure they can register with monit to monitor them when they start.
|
||||||
# If monit is already running, this step is still useful as we need monit to
|
# If monit is already running, this step is still useful as we need monit to
|
||||||
# reload its config files.
|
# reload its config files.
|
||||||
|
|
||||||
|
echo "Restarting"
|
||||||
/etc/init.d/monit restart
|
/etc/init.d/monit restart
|
||||||
|
echo "Restarting Done"
|
||||||
|
|
||||||
#give monit some time to boot-up before issuing commands
|
#give monit some time to boot-up before issuing commands
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
monit monitor airtime-media-monitor
|
monit monitor airtime-media-monitor
|
||||||
|
sleep 0.5
|
||||||
monit monitor airtime-liquidsoap
|
monit monitor airtime-liquidsoap
|
||||||
|
sleep 0.5
|
||||||
monit monitor airtime-playout
|
monit monitor airtime-playout
|
||||||
|
sleep 0.5
|
||||||
monit monitor airtime-show-recorder
|
monit monitor airtime-show-recorder
|
||||||
|
sleep 0.5
|
||||||
monit monitor rabbitmq-server
|
monit monitor rabbitmq-server
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
#!/bin/bash -e
|
|
||||||
#-e Causes bash script to exit if any of the installers
|
|
||||||
#return with a non-zero return value.
|
|
||||||
|
|
||||||
if [ `whoami` != 'root' ]; then
|
|
||||||
echo "Please run as root user."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
set +e
|
|
||||||
DEB=$(dpkg -s airtime 2> /dev/null | grep Status)
|
|
||||||
set -e
|
|
||||||
if [[ "$DEB" = "Status: install ok installed" ]]; then
|
|
||||||
echo -e "\nDebian package of Airtime detected. Please use the debian package to upgrade.\n"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Check whether version of virtualenv is <= 1.4.8. If so exit install.
|
|
||||||
BAD_VERSION="1.4.8"
|
|
||||||
VERSION=$(virtualenv --version)
|
|
||||||
NEWEST_VERSION=$(echo -e "$BAD_VERSION\n$VERSION\n'" | sort -t '.' -g | tail -n 1)
|
|
||||||
echo -n "Ensuring python-virtualenv version > $BAD_VERSION..."
|
|
||||||
if [[ "$NEWEST_VERSION" = "$BAD_VERSION" ]]; then
|
|
||||||
URL="http://apt.sourcefabric.org/pool/main/p/python-virtualenv/python-virtualenv_1.4.9-3_all.deb"
|
|
||||||
echo "Failed!"
|
|
||||||
echo "You have version $BAD_VERSION or older installed. Please install package at $URL first and then try installing Airtime again."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Success!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo -e "\n******************************** Install Begin *********************************"
|
|
||||||
|
|
||||||
#copy files to
|
|
||||||
## /etc/airtime
|
|
||||||
#+ /etc/apache2/sites-available/airtime
|
|
||||||
#+ /etc/apache2/sites-enabled/airtime
|
|
||||||
## /etc/cron.d/
|
|
||||||
## /etc/init.d/
|
|
||||||
## /etc/monit/conf.d/
|
|
||||||
# /usr/lib/airtime/airtime_virtualenv
|
|
||||||
# /usr/lib/airtime/api_clients
|
|
||||||
# /usr/lib/airtime/media-monitor
|
|
||||||
# /srv/airtime
|
|
||||||
# /usr/lib/airtime/pypo
|
|
||||||
# /usr/lib/airtime/show-recorder
|
|
||||||
## /usr/lib/airtime/utils
|
|
||||||
## /usr/bin/airtime-*
|
|
||||||
## /usr/share/airtime
|
|
||||||
## /var/log/airtime
|
|
||||||
## /var/tmp/airtime
|
|
||||||
|
|
||||||
# Absolute path to this script, e.g. /home/user/bin/foo.sh
|
|
||||||
SCRIPT=`readlink -f $0`
|
|
||||||
# Absolute path this script is in, thus /home/user/bin
|
|
||||||
SCRIPTPATH=`dirname $SCRIPT`
|
|
||||||
|
|
||||||
mkdir -p /etc/airtime
|
|
||||||
cp $SCRIPTPATH/../airtime_mvc/build/airtime.conf /etc/airtime
|
|
||||||
cp $SCRIPTPATH/../python_apps/api_clients/api_client.cfg /etc/airtime
|
|
||||||
cp $SCRIPTPATH/../python_apps/show-recorder/recorder.cfg /etc/airtime
|
|
||||||
cp $SCRIPTPATH/../python_apps/media-monitor/media-monitor.cfg /etc/airtime
|
|
||||||
cp $SCRIPTPATH/../python_apps/pypo/pypo.cfg /etc/airtime
|
|
||||||
cp $SCRIPTPATH/../python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg /etc/airtime
|
|
||||||
|
|
||||||
HOUR=$(($RANDOM%24))
|
|
||||||
MIN=$(($RANDOM%60))
|
|
||||||
echo "$MIN $HOUR * * * root /usr/lib/airtime/utils/phone_home_stat" > /etc/cron.d/airtime-crons
|
|
||||||
|
|
||||||
cp $SCRIPTPATH/../python_apps/show-recorder/airtime-show-recorder-init-d /etc/init.d/airtime-show-recorder
|
|
||||||
cp $SCRIPTPATH/../python_apps/media-monitor/airtime-media-monitor-init-d /etc/init.d/airtime-media-monitor
|
|
||||||
cp $SCRIPTPATH/../python_apps/pypo/airtime-playout-init-d /etc/init.d/airtime-playout
|
|
||||||
|
|
||||||
cp $SCRIPTPATH/../python_apps/monit/monit-airtime-generic.cfg /etc/monit/conf.d/
|
|
||||||
#cp $SCRIPTPATH/../python_apps/monit/monit-airtime-rabbitmq-server.cfg /etc/monit/conf.d/
|
|
||||||
cp $SCRIPTPATH/../python_apps/media-monitor/monit-airtime-media-monitor.cfg /etc/monit/conf.d/
|
|
||||||
cp $SCRIPTPATH/../python_apps/show-recorder/monit-airtime-show-recorder.cfg /etc/monit/conf.d/
|
|
||||||
cp $SCRIPTPATH/../python_apps/pypo/monit-airtime-liquidsoap.cfg /etc/monit/conf.d/
|
|
||||||
cp $SCRIPTPATH/../python_apps/pypo/monit-airtime-playout.cfg /etc/monit/conf.d/
|
|
||||||
|
|
||||||
cp -R $SCRIPTPATH/../utils /usr/lib/airtime
|
|
||||||
|
|
||||||
ln -s /usr/lib/airtime/utils/airtime-import/airtime-import /usr/bin/airtime-import
|
|
||||||
ln -s /usr/lib/airtime/utils/airtime-update-db-settings /usr/bin/airtime-update-db-settings
|
|
||||||
ln -s /usr/lib/airtime/utils/airtime-check-system /usr/bin/airtime-check-system
|
|
||||||
ln -s /usr/lib/airtime/utils/airtime-log /usr/bin/airtime-log
|
|
||||||
|
|
||||||
cp -R $SCRIPTPATH/../airtime_mvc/* /usr/share/airtime/
|
|
||||||
|
|
||||||
mkdir -p /var/log/airtime
|
|
||||||
mkdir -p /var/tmp/airtime
|
|
96
install_minimal/airtime-install-old
Executable file
96
install_minimal/airtime-install-old
Executable file
|
@ -0,0 +1,96 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
#-e Causes bash script to exit if any of the installers
|
||||||
|
#return with a non-zero return value.
|
||||||
|
|
||||||
|
if [ `whoami` != 'root' ]; then
|
||||||
|
echo "Please run as root user."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set +e
|
||||||
|
DEB=$(dpkg -s airtime 2> /dev/null | grep Status)
|
||||||
|
set -e
|
||||||
|
if [[ "$DEB" = "Status: install ok installed" ]]; then
|
||||||
|
echo -e "\nDebian package of Airtime detected. Please use the debian package to upgrade.\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#Check whether version of virtualenv is <= 1.4.8. If so exit install.
|
||||||
|
BAD_VERSION="1.4.8"
|
||||||
|
VERSION=$(virtualenv --version)
|
||||||
|
NEWEST_VERSION=$(echo -e "$BAD_VERSION\n$VERSION\n'" | sort -t '.' -g | tail -n 1)
|
||||||
|
echo -n "Ensuring python-virtualenv version > $BAD_VERSION..."
|
||||||
|
if [[ "$NEWEST_VERSION" = "$BAD_VERSION" ]]; then
|
||||||
|
URL="http://apt.sourcefabric.org/pool/main/p/python-virtualenv/python-virtualenv_1.4.9-3_all.deb"
|
||||||
|
echo "Failed!"
|
||||||
|
echo "You have version $BAD_VERSION or older installed. Please install package at $URL first and then try installing Airtime again."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Success!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo -e "\n******************************** Install Begin *********************************"
|
||||||
|
|
||||||
|
# Absolute path to this script
|
||||||
|
SCRIPT=`readlink -f $0`
|
||||||
|
# Absolute directory this script is in
|
||||||
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
|
||||||
|
${SCRIPTPATH}/../python_apps/python-virtualenv/virtualenv-install.sh
|
||||||
|
|
||||||
|
virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
||||||
|
. ${virtualenv_bin}activate
|
||||||
|
|
||||||
|
echo -e "\n*** Creating Pypo User ***"
|
||||||
|
python ${SCRIPTPATH}/../python_apps/create-pypo-user.py
|
||||||
|
|
||||||
|
set +e
|
||||||
|
php --php-ini ${SCRIPTPATH}/airtime-php.ini ${SCRIPTPATH}/include/airtime-install.php $@
|
||||||
|
result=$?
|
||||||
|
|
||||||
|
if [ "$result" -ne "0" ]; then
|
||||||
|
#There was an error, exit with error code.
|
||||||
|
echo "There was an error during upgrade. Exit code $result"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo -e "\n*** API Client Installation ***"
|
||||||
|
python ${SCRIPTPATH}/../python_apps/api_clients/install/api_client_install.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/media-monitor/install/media-monitor-install.py
|
||||||
|
|
||||||
|
python ${SCRIPTPATH}/../python_apps/icecast2/install/icecast2-install.py
|
||||||
|
|
||||||
|
# Start monit if it is not running, or restart if it is.
|
||||||
|
# Need to ensure monit is running before Airtime daemons are run. This is
|
||||||
|
# so we can ensure they can register with monit to monitor them when they start.
|
||||||
|
# If monit is already running, this step is still useful as we need monit to
|
||||||
|
# reload its config files.
|
||||||
|
/etc/init.d/monit restart
|
||||||
|
|
||||||
|
#give monit some time to boot-up before issuing commands
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
set +e
|
||||||
|
monit monitor airtime-media-monitor
|
||||||
|
monit monitor airtime-liquidsoap
|
||||||
|
monit monitor airtime-playout
|
||||||
|
monit monitor airtime-show-recorder
|
||||||
|
monit monitor rabbitmq-server
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo -e "\n*** Verifying your system environment ***"
|
||||||
|
sleep 10
|
||||||
|
airtime-check-system
|
||||||
|
|
||||||
|
echo -e "\n******************************* Install Complete *******************************"
|
78
install_minimal/include/airtime-copy-files.sh
Executable file
78
install_minimal/include/airtime-copy-files.sh
Executable file
|
@ -0,0 +1,78 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
#-e Causes bash script to exit if any of the installers
|
||||||
|
#return with a non-zero return value.
|
||||||
|
|
||||||
|
if [ `whoami` != 'root' ]; then
|
||||||
|
echo "Please run as root user."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#copy files to
|
||||||
|
## /etc/airtime
|
||||||
|
#+ /etc/apache2/sites-available/airtime
|
||||||
|
#+ /etc/apache2/sites-enabled/airtime
|
||||||
|
## /etc/cron.d/
|
||||||
|
## /etc/init.d/
|
||||||
|
## /etc/monit/conf.d/
|
||||||
|
# /usr/lib/airtime/airtime_virtualenv
|
||||||
|
## /usr/lib/airtime/api_clients
|
||||||
|
## /usr/lib/airtime/media-monitor
|
||||||
|
# /srv/airtime/stor
|
||||||
|
## /usr/lib/airtime/pypo
|
||||||
|
## /usr/lib/airtime/show-recorder
|
||||||
|
## /usr/lib/airtime/utils
|
||||||
|
## /usr/bin/airtime-*
|
||||||
|
## /usr/share/airtime
|
||||||
|
## /var/log/airtime
|
||||||
|
## /var/tmp/airtime
|
||||||
|
|
||||||
|
# Absolute path to this script, e.g. /home/user/bin/foo.sh
|
||||||
|
SCRIPT=`readlink -f $0`
|
||||||
|
# Absolute path this script is in, thus /home/user/bin
|
||||||
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
|
||||||
|
AIRTIMEROOT=$SCRIPTPATH/../../
|
||||||
|
|
||||||
|
mkdir -p /etc/airtime
|
||||||
|
cp $AIRTIMEROOT/airtime_mvc/build/airtime.conf /etc/airtime
|
||||||
|
cp $AIRTIMEROOT/python_apps/api_clients/api_client.cfg /etc/airtime
|
||||||
|
cp $AIRTIMEROOT/python_apps/show-recorder/recorder.cfg /etc/airtime
|
||||||
|
cp $AIRTIMEROOT/python_apps/media-monitor/media-monitor.cfg /etc/airtime
|
||||||
|
cp $AIRTIMEROOT/python_apps/pypo/pypo.cfg /etc/airtime
|
||||||
|
cp $AIRTIMEROOT/python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg /etc/airtime
|
||||||
|
|
||||||
|
HOUR=$(($RANDOM%24))
|
||||||
|
MIN=$(($RANDOM%60))
|
||||||
|
echo "$MIN $HOUR * * * root /usr/lib/airtime/utils/phone_home_stat" > /etc/cron.d/airtime-crons
|
||||||
|
|
||||||
|
cp $AIRTIMEROOT/python_apps/show-recorder/airtime-show-recorder-init-d /etc/init.d/airtime-show-recorder
|
||||||
|
cp $AIRTIMEROOT/python_apps/media-monitor/airtime-media-monitor-init-d /etc/init.d/airtime-media-monitor
|
||||||
|
cp $AIRTIMEROOT/python_apps/pypo/airtime-playout-init-d /etc/init.d/airtime-playout
|
||||||
|
|
||||||
|
cp $AIRTIMEROOT/python_apps/monit/monit-airtime-generic.cfg /etc/monit/conf.d/
|
||||||
|
#cp $AIRTIMEROOT/python_apps/monit/monit-airtime-rabbitmq-server.cfg /etc/monit/conf.d/
|
||||||
|
cp $AIRTIMEROOT/python_apps/media-monitor/monit-airtime-media-monitor.cfg /etc/monit/conf.d/
|
||||||
|
cp $AIRTIMEROOT/python_apps/show-recorder/monit-airtime-show-recorder.cfg /etc/monit/conf.d/
|
||||||
|
cp $AIRTIMEROOT/python_apps/pypo/monit-airtime-liquidsoap.cfg /etc/monit/conf.d/
|
||||||
|
cp $AIRTIMEROOT/python_apps/pypo/monit-airtime-playout.cfg /etc/monit/conf.d/
|
||||||
|
|
||||||
|
python $AIRTIMEROOT/python_apps/api_clients/install/api_client_install.py
|
||||||
|
python $AIRTIMEROOT/python_apps/pypo/install/pypo-install-files.py
|
||||||
|
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-install-files.py
|
||||||
|
python $AIRTIMEROOT/python_apps/show-recorder/install/recorder-install-files.py
|
||||||
|
|
||||||
|
cp -R $AIRTIMEROOT/utils /usr/lib/airtime
|
||||||
|
|
||||||
|
#create symbolic links
|
||||||
|
ln -sf /usr/lib/airtime/utils/airtime-import/airtime-import /usr/bin/airtime-import
|
||||||
|
ln -sf /usr/lib/airtime/utils/airtime-update-db-settings /usr/bin/airtime-update-db-settings
|
||||||
|
ln -sf /usr/lib/airtime/utils/airtime-check-system /usr/bin/airtime-check-system
|
||||||
|
ln -sf /usr/lib/airtime/utils/airtime-log /usr/bin/airtime-log
|
||||||
|
|
||||||
|
mkdir -p /usr/share/airtime
|
||||||
|
cp -R $AIRTIMEROOT/airtime_mvc/* /usr/share/airtime/
|
||||||
|
|
||||||
|
mkdir -p /var/log/airtime
|
||||||
|
mkdir -p /var/tmp/airtime
|
||||||
|
|
||||||
|
#Finished copying files
|
|
@ -16,9 +16,6 @@ require_once(dirname(__FILE__).'/AirtimeInstall.php');
|
||||||
require_once(__DIR__.'/airtime-constants.php');
|
require_once(__DIR__.'/airtime-constants.php');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AirtimeInstall::ExitIfNotRoot();
|
AirtimeInstall::ExitIfNotRoot();
|
||||||
|
|
||||||
require_once('Zend/Loader/Autoloader.php');
|
require_once('Zend/Loader/Autoloader.php');
|
||||||
|
@ -117,8 +114,8 @@ if ($overwrite) {
|
||||||
AirtimeIni::CreateIniFiles();
|
AirtimeIni::CreateIniFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
AirtimeInstall::InstallPhpCode();
|
//AirtimeInstall::InstallPhpCode();
|
||||||
AirtimeInstall::InstallBinaries();
|
//AirtimeInstall::InstallBinaries();
|
||||||
|
|
||||||
if ($overwrite) {
|
if ($overwrite) {
|
||||||
echo "* Initializing INI files".PHP_EOL;
|
echo "* Initializing INI files".PHP_EOL;
|
||||||
|
@ -144,10 +141,10 @@ if ($db_install) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AirtimeInstall::CreateSymlinksToUtils();
|
#AirtimeInstall::CreateSymlinksToUtils();
|
||||||
|
|
||||||
AirtimeInstall::CreateZendPhpLogFile();
|
AirtimeInstall::CreateZendPhpLogFile();
|
||||||
|
|
||||||
AirtimeInstall::CreateCronFile();
|
#AirtimeInstall::CreateCronFile();
|
||||||
|
|
||||||
/* FINISHED AIRTIME PHP INSTALLER */
|
/* FINISHED AIRTIME PHP INSTALLER */
|
||||||
|
|
|
@ -11,8 +11,8 @@ try:
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
|
|
||||||
#Start media-monitor daemon
|
#Start media-monitor daemon
|
||||||
#p = Popen("/etc/init.d/airtime-media-monitor start-no-monit", shell=True)
|
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
|
||||||
p = Popen("/etc/init.d/airtime-media-monitor restart", shell=True)
|
p = Popen("/etc/init.d/airtime-media-monitor start-no-monit", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print e
|
print e
|
||||||
|
|
|
@ -44,6 +44,7 @@ try:
|
||||||
|
|
||||||
#create log dir
|
#create log dir
|
||||||
create_dir(config['log_dir'])
|
create_dir(config['log_dir'])
|
||||||
|
os.system("chown -R pypo:pypo "+config["log_dir"])
|
||||||
|
|
||||||
#copy python files
|
#copy python files
|
||||||
copy_dir("%s/.."%current_script_dir, config["bin_dir"])
|
copy_dir("%s/.."%current_script_dir, config["bin_dir"])
|
||||||
|
|
|
@ -102,8 +102,8 @@ try:
|
||||||
|
|
||||||
#restart airtime-playout
|
#restart airtime-playout
|
||||||
print "Waiting for processes to start..."
|
print "Waiting for processes to start..."
|
||||||
#p = Popen("/etc/init.d/airtime-playout start-no-monit", shell=True)
|
p = Popen("/etc/init.d/airtime-playout stop", shell=True)
|
||||||
p = Popen("/etc/init.d/airtime-playout restart", shell=True)
|
p = Popen("/etc/init.d/airtime-playout start-no-monit", shell=True)
|
||||||
sts = os.waitpid(p.pid, 0)[1]
|
sts = os.waitpid(p.pid, 0)[1]
|
||||||
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|
|
@ -45,9 +45,11 @@ try:
|
||||||
|
|
||||||
#create pypo log dir
|
#create pypo log dir
|
||||||
create_dir(config['pypo_log_dir'])
|
create_dir(config['pypo_log_dir'])
|
||||||
|
os.system("chown -R pypo:pypo "+config["pypo_log_dir"])
|
||||||
|
|
||||||
#create liquidsoap log dir
|
#create liquidsoap log dir
|
||||||
create_dir(config['liquidsoap_log_dir'])
|
create_dir(config['liquidsoap_log_dir'])
|
||||||
|
os.system("chown -R pypo:pypo "+config["liquidsoap_log_dir"])
|
||||||
|
|
||||||
#create cache, tmp, file dirs
|
#create cache, tmp, file dirs
|
||||||
create_dir(config['cache_dir'])
|
create_dir(config['cache_dir'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue