4
from charmhelpers.core.hookenv import log, unit_get
7
hue_home = os.path.join(os.path.sep, "usr", "share", "hue")
8
hue_ini = os.path.join(os.path.sep, hue_home, "desktop", "conf","hue.ini")
9
stop_hue_script = os.path.join(os.path.sep, os.environ['CHARM_DIR'], "files", "scripts", "stop_hue.sh")
12
# stop_hue_script is a workaround to shutdown "hue runserver" - needs a better solution
13
# from hue community - sent an email 12/13/2014 - amir sanjar
14
subprocess.call(stop_hue_script)
15
ip = unit_get('private-address')
16
hue_exe = os.path.join(os.path.sep, hue_home, "build", "env", "bin", "hue")
17
cmd = hue_exe+" runserver "+ip+":8000"
18
subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE)
b'\\ No newline at end of file'