SAAS-83: Add ability to install Airtime components separately

-fixed
This commit is contained in:
Martin Konecny 2011-11-24 17:31:26 -05:00
parent f75d216bae
commit 15a27526f9
9 changed files with 80 additions and 52 deletions

View file

@ -27,16 +27,20 @@ def create_dir(path):
PATH_INI_FILE = '/etc/airtime/recorder.cfg'
# load config file
try:
config = ConfigObj(PATH_INI_FILE)
except Exception, e:
print 'Error loading config file: ', e
sys.exit(1)
try:
# Absolute path this script is in
current_script_dir = get_current_script_dir()
if not os.path.exists(PATH_INI_FILE):
shutil.copy('%s/../recorder.cfg'%current_script_dir, PATH_INI_FILE)
# load config file
try:
config = ConfigObj(PATH_INI_FILE)
except Exception, e:
print 'Error loading config file: ', e
sys.exit(1)
#copy monit files
shutil.copy('%s/../monit-airtime-show-recorder.cfg'%current_script_dir, '/etc/monit/conf.d/')

View file

@ -8,7 +8,7 @@ if os.geteuid() != 0:
try:
print "Waiting for show-recorder processes to stop...",
if (os.path.exists('/etc/init.d/airtime-playout')):
if (os.path.exists('/etc/init.d/airtime-show-recorder')):
p = Popen("/etc/init.d/airtime-show-recorder stop", shell=True)
sts = os.waitpid(p.pid, 0)[1]
print "OK"