mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Uh idk we also need to run this explicitly with /bin/bash
This commit is contained in:
parent
a416044376
commit
dd92a34202
1 changed files with 9 additions and 2 deletions
|
@ -335,8 +335,15 @@ def service_status(names=[]):
|
|||
|
||||
# 'test_status' is an optional field to test the status of the service using a custom command
|
||||
if "test_status" in services[name]:
|
||||
status = os.system(services[name]["test_status"])
|
||||
result[name]["status"] = "running" if status == 0 else "failed"
|
||||
p = subprocess.Popen(services[name]["test_status"],
|
||||
shell=True,
|
||||
executable='/bin/bash',
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
|
||||
p.communicate()
|
||||
|
||||
result[name]["status"] = "running" if p.returncode == 0 else "failed"
|
||||
|
||||
# 'test_status' is an optional field to test the status of the service using a custom command
|
||||
if "test_conf" in services[name]:
|
||||
|
|
Loading…
Add table
Reference in a new issue