Merge pull request #899 from mailcow/dev
[DockerAPI] Hide stderr from rspamadm output
This commit is contained in:
commit
823fc80bcb
@ -82,7 +82,7 @@ class container_post(Resource):
|
|||||||
elif request.json['cmd'] == 'worker_password' and request.json['raw']:
|
elif request.json['cmd'] == 'worker_password' and request.json['raw']:
|
||||||
try:
|
try:
|
||||||
for container in docker_client.containers.list(filters={"id": container_id}):
|
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 = open("/access.inc", "w")
|
||||||
f.write('enable_password = "' + re.sub('[^0-9a-zA-Z\$]+', '', hash.rstrip()) + '";\n')
|
f.write('enable_password = "' + re.sub('[^0-9a-zA-Z\$]+', '', hash.rstrip()) + '";\n')
|
||||||
f.close()
|
f.close()
|
||||||
|
@ -328,7 +328,7 @@ services:
|
|||||||
- watchdog
|
- watchdog
|
||||||
|
|
||||||
dockerapi-mailcow:
|
dockerapi-mailcow:
|
||||||
image: mailcow/dockerapi:1.4
|
image: mailcow/dockerapi:1.5
|
||||||
restart: always
|
restart: always
|
||||||
build: ./data/Dockerfiles/dockerapi
|
build: ./data/Dockerfiles/dockerapi
|
||||||
oom_score_adj: -10
|
oom_score_adj: -10
|
||||||
|
Loading…
Reference in New Issue
Block a user