CC-2888: Create a monit file for each airtime component

-remove old monit file on upgrade
-remove old monit file from git repo.
This commit is contained in:
martin 2011-09-26 14:47:21 -04:00
parent 979a3fd414
commit 2c0b0a2eff
2 changed files with 8 additions and 29 deletions

View File

@ -238,7 +238,7 @@ class Airtime200Upgrade{
}
public static function InstallAirtimePhpServerCode($phpDir)
{
{
$AIRTIME_SRC = realpath(__DIR__.'/../../../airtime_mvc');
@ -247,7 +247,11 @@ class Airtime200Upgrade{
echo "* Installing PHP code to ".$phpDir.PHP_EOL;
exec("mkdir -p ".$phpDir);
exec("cp -R ".$AIRTIME_SRC."/* ".$phpDir);
}
}
public static function RemoveOldMonitFile(){
unlink("/etc/monit/conf.d/airtime-monit.cfg");
}
}
class ConvertToUtc{
@ -577,6 +581,8 @@ AirtimeInstall::SetDefaultStreamSetting();
AirtimeInstall::GetOldLiquidsoapCfgAndUpdate();
AirtimeUpgrade::RemoveOldMonitFile();
// restart monit
exec("service monit restart");

View File

@ -1,27 +0,0 @@
set daemon 10 # Poll at 5 second intervals
#set logfile syslog facility log_daemon
set logfile /var/log/monit.log
set httpd port 2812
allow admin:monit
check process airtime-playout
with pidfile "/var/run/airtime-playout.pid"
start program = "/etc/init.d/airtime-playout monit-restart" with timeout 5 seconds
stop program = "/etc/init.d/airtime-playout stop"
check process airtime-liquidsoap
with pidfile "/var/run/airtime-liquidsoap.pid"
start program = "/etc/init.d/airtime-playout monit-restart" with timeout 5 seconds
stop program = "/etc/init.d/airtime-playout stop"
check process airtime-media-monitor
with pidfile "/var/run/airtime-media-monitor.pid"
start program = "/etc/init.d/airtime-media-monitor start" with timeout 10 seconds
stop program = "/etc/init.d/airtime-media-monitor stop"
check process airtime-show-recorder
with pidfile "/var/run/airtime-show-recorder.pid"
start program = "/etc/init.d/airtime-show-recorder start" with timeout 10 seconds
stop program = "/etc/init.d/airtime-show-recorder stop"
check process rabbitmq-server
with pidfile "/var/run/rabbitmq.pid"
start program = "/bin/bash -c '/etc/init.d/rabbitmq-server start; sed "s/.*,\(.*\)\}.*/\1/" /var/lib/rabbitmq/pids > /var/run/rabbitmq.pid'"
stop program = "/etc/init.d/rabbitmq-server stop"