Fixed a bunch of installer stuff for Naomi
This commit is contained in:
parent
41e2b5d840
commit
b920ed2598
4 changed files with 31 additions and 17 deletions
|
@ -38,6 +38,7 @@ rabbitmq_install () {
|
|||
rabbitmqctl add_vhost $RABBITMQ_VHOST
|
||||
rabbitmqctl add_user $RABBITMQ_USER $RABBITMQ_PASSWORD
|
||||
rabbitmqctl set_permissions -p $RABBITMQ_VHOST $RABBITMQ_USER "$EXCHANGES" "$EXCHANGES" "$EXCHANGES"
|
||||
rabbitmqctl set_permissions -p $RABBITMQ_VHOST $RABBITMQ_USER .\* .\* .\*
|
||||
|
||||
export RABBITMQ_USER
|
||||
export RABBITMQ_PASSWORD
|
||||
|
@ -49,6 +50,7 @@ preserve="f"
|
|||
nodb="f"
|
||||
reinstall="f"
|
||||
mediamonitor="f"
|
||||
airtime_analyzer="f"
|
||||
pypo="f"
|
||||
showrecorder="f"
|
||||
web="f"
|
||||
|
@ -64,6 +66,7 @@ do
|
|||
(-n|--no-db) nodb="t";;
|
||||
(-r|--reinstall) reinstall="t";;
|
||||
(-m|--media-monitor) mediamonitor="t";;
|
||||
(-a|--airtime-analyzer) airtime_analyzer="t";;
|
||||
(-y|--pypo) pypo="t";;
|
||||
(-w|--web) web="t";;
|
||||
(-d|--disable-deb-check) disable_deb_check="t";;
|
||||
|
@ -75,11 +78,12 @@ do
|
|||
shift
|
||||
done
|
||||
|
||||
if [ "$mediamonitor" = "f" -a "$pypo" = "f" -a "$web" = "f" ]; then
|
||||
if [ "$mediamonitor" = "f" -a "$pypo" = "f" -a "$web" = "f" -a "$airtime_analyzer" = "f" ]; then
|
||||
#none of these install parameters were specified, so by default we install all of them
|
||||
mediamonitor="t"
|
||||
mediamonitor="f" # FIXME: Remove media_monitor! -- Albert
|
||||
pypo="t"
|
||||
showrecorder="t"
|
||||
airtime_analyzer="t"
|
||||
web="t"
|
||||
fi
|
||||
|
||||
|
@ -181,6 +185,7 @@ fi
|
|||
#export these variables to make them available in sub bash scripts
|
||||
export DO_UPGRADE
|
||||
export mediamonitor
|
||||
export airtime_analyzer
|
||||
export pypo
|
||||
export showrecorder
|
||||
export web
|
||||
|
@ -236,6 +241,9 @@ if [ "$mediamonitor" = "t" -o "$pypo" = "t" ]; then
|
|||
deactivate
|
||||
fi
|
||||
|
||||
# Restart airtime_analyzer (or start it)
|
||||
service airtime_analyzer restart
|
||||
|
||||
|
||||
#An attempt to force apache to realize that files are updated on upgrade...
|
||||
touch /usr/share/airtime/public/index.php
|
||||
|
|
|
@ -64,8 +64,10 @@ echo "* Creating /usr/lib/airtime"
|
|||
if [ "$python_service" -eq "0" ]; then
|
||||
python $AIRTIMEROOT/python_apps/api_clients/install/api_client_install.py
|
||||
|
||||
if [ "$mediamonitor" = "t" ]; then
|
||||
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-copy-files.py
|
||||
if [ "$airtime_analyzer" = "t" ]; then
|
||||
pushd $AIRTIMEROOT/python_apps/airtime_analyzer/
|
||||
python setup.py install
|
||||
popd
|
||||
fi
|
||||
if [ "$pypo" = "t" ]; then
|
||||
python $AIRTIMEROOT/python_apps/pypo/install/pypo-copy-files.py
|
||||
|
|
|
@ -65,6 +65,9 @@ if ($return_code == 0) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
// Stop media-monitor
|
||||
service media-monitor stop-with-monit
|
||||
|
||||
//convert strings like 1.9.0-devel to 1.9.0
|
||||
$version = substr($version, 0, 5);
|
||||
|
||||
|
|
|
@ -195,19 +195,20 @@ class AirtimeCheck {
|
|||
$log = "/var/log/airtime/pypo-liquidsoap/ls_script.log";
|
||||
self::show_log_file($log);
|
||||
}
|
||||
if (isset($services->media_monitor) && $services->media_monitor->process_id != "FAILED") {
|
||||
self::output_status("MEDIA_MONITOR_PROCESS_ID", $data->services->media_monitor->process_id);
|
||||
self::output_status("MEDIA_MONITOR_RUNNING_SECONDS", $data->services->media_monitor->uptime_seconds);
|
||||
self::output_status("MEDIA_MONITOR_MEM_PERC", $data->services->media_monitor->memory_perc);
|
||||
self::output_status("MEDIA_MONITOR_CPU_PERC", $data->services->media_monitor->cpu_perc);
|
||||
} else {
|
||||
self::output_status("MEDIA_MONITOR_PROCESS_ID", "FAILED");
|
||||
self::output_status("MEDIA_MONITOR_RUNNING_SECONDS", "0");
|
||||
self::output_status("MEDIA_MONITOR_MEM_PERC", "0%");
|
||||
self::output_status("MEDIA_MONITOR_CPU_PERC", "0%");
|
||||
$log = "/var/log/airtime/media-monitor/media-monitor.log";
|
||||
self::show_log_file($log);
|
||||
}
|
||||
|
||||
#if (isset($services->media_monitor) && $services->media_monitor->process_id != "FAILED") {
|
||||
# self::output_status("MEDIA_MONITOR_PROCESS_ID", $data->services->media_monitor->process_id);
|
||||
# self::output_status("MEDIA_MONITOR_RUNNING_SECONDS", $data->services->media_monitor->uptime_seconds);
|
||||
# self::output_status("MEDIA_MONITOR_MEM_PERC", $data->services->media_monitor->memory_perc);
|
||||
# self::output_status("MEDIA_MONITOR_CPU_PERC", $data->services->media_monitor->cpu_perc);
|
||||
#} else {
|
||||
# self::output_status("MEDIA_MONITOR_PROCESS_ID", "FAILED");
|
||||
# self::output_status("MEDIA_MONITOR_RUNNING_SECONDS", "0");
|
||||
# self::output_status("MEDIA_MONITOR_MEM_PERC", "0%");
|
||||
# self::output_status("MEDIA_MONITOR_CPU_PERC", "0%");
|
||||
# $log = "/var/log/airtime/media-monitor/media-monitor.log";
|
||||
# self::show_log_file($log);
|
||||
#}
|
||||
}
|
||||
|
||||
if (self::$AIRTIME_STATUS_OK){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue