Allow reading output file by group

This commit is contained in:
Mathias Petermann 2022-03-24 16:58:03 +01:00
parent d92d715ee4
commit 336ae12f4b
No known key found for this signature in database
GPG Key ID: DADC3DF6E81B66C1

View File

@ -3,6 +3,7 @@
import argparse
import json
from os import chmod
import shutil
import signal
import tempfile
@ -170,6 +171,7 @@ class PrometheusSD:
json.dump(output, tf, indent=4)
shutil.move(temp_file.name, self.config.config["output_file"])
chmod(self.config.config["output_file"], 0o640)
def _terminate(self, signal, frame):
self.log.sysexit_with_message("Terminating", code=0)