cc-4105: updated config and installation scripts

This commit is contained in:
Rudi Grinberg 2012-08-14 12:01:24 -04:00
parent 843dd664e3
commit b22b9b9aa3
6 changed files with 36 additions and 24 deletions

View file

@ -8,7 +8,7 @@ virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
media_monitor_path="/usr/lib/airtime/media-monitor/"
media_monitor_script="media_monitor.py"
api_client_path="/usr/lib/airtime/"
api_client_path="/usr/lib/airtime/:/usr/lib/airtime/media-monitor/mm2/"
cd ${media_monitor_path}

View file

@ -59,7 +59,9 @@ try:
#copy python files
copy_dir("%s/.."%current_script_dir, config["bin_dir"])
# mm2
#copy_dir("%s/../../media-monitor2/"%current_script_dir, config["bin_dir"])
mm2_source = os.path.realpath(os.path.join(current_script_dir,
"../../media-monitor2"))
copy_dir(mm2_source, os.path.join( config["bin_dir"], "mm2" ))
#copy init.d script
shutil.copy(config["bin_dir"]+"/airtime-media-monitor-init-d", "/etc/init.d/airtime-media-monitor")

View file

@ -21,12 +21,11 @@ rabbitmq_vhost = '/'
check_filesystem_events = 5 #how long to queue up events performed on the files themselves.
check_airtime_events = 30 #how long to queue metadata input from airtime.
check_filesystem_events = 5 #how long to queue up events performed on the files themselves.
check_airtime_events = 30 #how long to queue metadata input from airtime.
# MM2 only:
touch_interval = 5
chunking_number = 450
request_max_wait = 3.0
rmq_event_wait = 0.5
logpath = '/var/log/airtime/media-monitor/mm2.log'
logpath = '/var/log/airtime/media-monitor/media-monitor.log'
index_path = '/var/tmp/airtime/media-monitor/last_index'

View file

@ -1,21 +1,11 @@
import logging
import time
import sys
import mm2.mm2 as mm2
from std_err_override import LogWriter
# configure logging
try:
logging.config.fileConfig("logging.cfg")
#need to wait for Python 2.7 for this..
#logging.captureWarnings(True)
global_cfg = '/etc/airtime/media-monitor.cfg'
api_client_cfg = '/etc/airtime/api_client.cfg'
logging_cfg = '/usr/lib/airtime/media-monitor/logging.cfg'
logger = logging.getLogger()
LogWriter.override_std_err(logger)
except Exception, e:
print 'Error configuring logging: ', e
sys.exit(1)
while True:
print("testing")
time.sleep(5)
mm2.main( global_cfg, api_client_cfg, logging_cfg )