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,17 +27,20 @@ def create_dir(path):
PATH_INI_FILE = '/etc/airtime/pypo.cfg'
# load config file
try:
config = ConfigObj(PATH_INI_FILE)
except Exception, e:
print 'Error loading config file: ', e
sys.exit(1)
try:
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/../pypo.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-playout.cfg'%current_script_dir, '/etc/monit/conf.d/')
shutil.copy('%s/../monit-airtime-liquidsoap.cfg'%current_script_dir, '/etc/monit/conf.d/')