Merge pull request #899 from mailcow/dev

[DockerAPI] Hide stderr from rspamadm output
This commit is contained in:
André Peters 2018-01-14 20:38:33 +01:00 committed by GitHub
commit 823fc80bcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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