CC-2758: Make airtime-install script Debian/Ubuntu compatible
-further tweaks
This commit is contained in:
parent
56edfe4e68
commit
fccaa554f5
9 changed files with 38 additions and 30 deletions
|
@ -42,4 +42,9 @@ python $SCRIPTPATH/../python_apps/create-pypo-user.py
|
|||
$SCRIPTPATH/include/airtime-copy-files.sh
|
||||
$SCRIPTPATH/include/airtime-initialize.sh $@
|
||||
|
||||
|
||||
echo -e "\n*** Verifying your system environment, running airtime-check-system ***"
|
||||
sleep 10
|
||||
airtime-check-system
|
||||
|
||||
echo -e "\n******************************* Install Complete *******************************"
|
||||
|
|
|
@ -45,10 +45,6 @@ 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/
|
||||
|
|
|
@ -50,7 +50,3 @@ 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
|
||||
|
|
|
@ -29,23 +29,22 @@ AIRTIMEROOT=$SCRIPTPATH/../../
|
|||
|
||||
rm -f /etc/cron.d/airtime-crons
|
||||
|
||||
echo "API Client"
|
||||
echo "* API Client"
|
||||
python $AIRTIMEROOT/python_apps/api_clients/install/api_client_uninstall.py
|
||||
echo "Pypo"
|
||||
echo "* Pypo"
|
||||
python $AIRTIMEROOT/python_apps/pypo/install/pypo-remove-files.py
|
||||
echo "Media-Monitor"
|
||||
echo "* Media-Monitor"
|
||||
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-remove-files.py
|
||||
echo "Show-Recorder"
|
||||
echo "* Show-Recorder"
|
||||
python $AIRTIMEROOT/python_apps/show-recorder/install/recorder-remove-files.py
|
||||
|
||||
rm -rf /usr/lib/airtime
|
||||
|
||||
#remove symlinks
|
||||
rm -f /usr/bin/airtime-import
|
||||
rm -f /usr/bin/airtime-update-db-settings
|
||||
rm -f /usr/bin/airtime-check-system
|
||||
rm -f /usr/bin/airtime-log
|
||||
|
||||
rm -rf /usr/lib/airtime
|
||||
rm -rf /usr/share/airtime
|
||||
|
||||
rm -rf /var/log/airtime
|
||||
|
|
|
@ -16,10 +16,10 @@ AIRTIMEROOT=$SCRIPTPATH/../../
|
|||
#unmonitor services
|
||||
echo "Unmonitoring Airtime Services"
|
||||
set +e
|
||||
monit unmonitor airtime-media-monitor
|
||||
monit unmonitor airtime-liquidsoap
|
||||
monit unmonitor airtime-playout
|
||||
monit unmonitor airtime-show-recorder
|
||||
monit unmonitor airtime-media-monitor >/dev/null 2>&1
|
||||
monit unmonitor airtime-liquidsoap >/dev/null 2>&1
|
||||
monit unmonitor airtime-playout >/dev/null 2>&1
|
||||
monit unmonitor airtime-show-recorder >/dev/null 2>&1
|
||||
#monit unmonitor rabbitmq-server
|
||||
set -e
|
||||
|
||||
|
|
|
@ -7,8 +7,12 @@ if os.geteuid() != 0:
|
|||
sys.exit(1)
|
||||
|
||||
try:
|
||||
print "Waiting for media-monitor processes to stop..."
|
||||
print "Waiting for media-monitor processes to stop...",
|
||||
if (os.path.exists('/etc/init.d/airtime-playout')):
|
||||
p = Popen("/etc/init.d/airtime-media-monitor stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
print "OK"
|
||||
else:
|
||||
print "Wasn't running"
|
||||
except Exception, e:
|
||||
print e
|
||||
|
|
|
@ -8,8 +8,12 @@ if os.geteuid() != 0:
|
|||
|
||||
try:
|
||||
#stop pypo and liquidsoap processes
|
||||
print "Waiting for pypo processes to stop..."
|
||||
print "Waiting for pypo processes to stop...",
|
||||
if (os.path.exists('/etc/init.d/airtime-playout')):
|
||||
p = Popen("/etc/init.d/airtime-playout stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
print "OK"
|
||||
else:
|
||||
print "Wasn't running"
|
||||
except Exception, e:
|
||||
print e
|
||||
|
|
|
@ -29,15 +29,15 @@ try:
|
|||
|
||||
#remove bin dir
|
||||
print "* Removing Show-Recorder Program Directories"
|
||||
shutil.rmtree(config["bin_dir"])
|
||||
shutil.rmtree(config["bin_dir"], ignore_errors=True)
|
||||
|
||||
#remove log dir
|
||||
print "* Removing Show-Recorder Log Directory"
|
||||
shutil.rmtree(config["log_dir"])
|
||||
shutil.rmtree(config["log_dir"], ignore_errors=True)
|
||||
|
||||
#remove temporary media-storage dir
|
||||
print "* Removing Show-Recorder Temporary Directory"
|
||||
shutil.rmtree(config["base_recorded_files"])
|
||||
shutil.rmtree(config["base_recorded_files"], ignore_errors=True)
|
||||
|
||||
#remove monit files
|
||||
print "* Removing Show-Recorder Monit Files"
|
||||
|
|
|
@ -7,9 +7,13 @@ if os.geteuid() != 0:
|
|||
sys.exit(1)
|
||||
|
||||
try:
|
||||
print "Waiting for show-recorder processes to stop..."
|
||||
print "Waiting for show-recorder processes to stop...",
|
||||
if (os.path.exists('/etc/init.d/airtime-playout')):
|
||||
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
print "OK"
|
||||
else:
|
||||
print "Wasn't running"
|
||||
except Exception, e:
|
||||
print e
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue