[DockerAPI] Hide stderr from rspamadm output

master
andre.peters 2018-01-14 18:44:06 +01:00
parent 5d5d36fc60
commit 09b6c20bad
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class container_post(Resource):
elif request.json['cmd'] == 'worker_password' and request.json['raw']:
try:
for container in docker_client.containers.list(filters={"id": container_id}):
hash = container.exec_run(["/bin/bash", "-c", "/usr/bin/rspamadm pw -e -p '" + request.json['raw'].replace("'", "'\\''") + "'"], user='_rspamd')
hash = container.exec_run(["/bin/bash", "-c", "/usr/bin/rspamadm pw -e -p '" + request.json['raw'].replace("'", "'\\''") + "' 2> /dev/null"], user='_rspamd')
f = open("/access.inc", "w")
f.write('enable_password = "' + re.sub('[^0-9a-zA-Z\$]+', '', hash.rstrip()) + '";\n')
f.close()

View File

@ -328,7 +328,7 @@ services:
- watchdog
dockerapi-mailcow:
image: mailcow/dockerapi:1.4
image: mailcow/dockerapi:1.5
restart: always
build: ./data/Dockerfiles/dockerapi
oom_score_adj: -10