CC-2888: Create a monit file for each airtime component
This commit is contained in:
parent
3f1ea46d3d
commit
974612badf
17 changed files with 100 additions and 16 deletions
|
@ -32,6 +32,10 @@ def get_current_script_dir():
|
|||
index = current_script_dir.rindex('/')
|
||||
return current_script_dir[0:index]
|
||||
|
||||
def copy_monit_file(current_script_dir):
|
||||
shutil.copy("%s/../monit-airtime-show-recorder.cfg"%current_script_dir, "/etc/monit/conf.d/")
|
||||
shutil.copy("%s/../../monit/monit-airtime-generic.cfg"%current_script_dir, "/etc/monit/conf.d/")
|
||||
|
||||
|
||||
try:
|
||||
# load config file
|
||||
|
@ -43,6 +47,8 @@ try:
|
|||
|
||||
current_script_dir = get_current_script_dir()
|
||||
|
||||
copy_monit_file(current_script_dir)
|
||||
|
||||
p = Popen("/etc/init.d/airtime-show-recorder stop >/dev/null 2>&1", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue