From cc65442d244ca549e729fcba3f75b9c041206f63 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sun, 15 Jan 2023 17:40:21 -0700 Subject: [PATCH] Rework style --- docker/rootfs/etc/services.d/go2rtc/run | 5 +++-- docker/rootfs/usr/local/go2rtc/create_config.py | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/rootfs/etc/services.d/go2rtc/run b/docker/rootfs/etc/services.d/go2rtc/run index 02ff18a0e..7dd51380f 100755 --- a/docker/rootfs/etc/services.d/go2rtc/run +++ b/docker/rootfs/etc/services.d/go2rtc/run @@ -4,7 +4,8 @@ set -o errexit -o nounset -o pipefail +raw_config = python3 /usr/local/go2rtc/create_config.py + # Replace the bash process with the go2rtc process, redirecting stderr to stdout exec 2>&1 -exec python3 /usr/local/go2rtc/create_config.py -exec go2rtc +exec go2rtc -config="${raw_config}" diff --git a/docker/rootfs/usr/local/go2rtc/create_config.py b/docker/rootfs/usr/local/go2rtc/create_config.py index 5caa8e786..704040913 100644 --- a/docker/rootfs/usr/local/go2rtc/create_config.py +++ b/docker/rootfs/usr/local/go2rtc/create_config.py @@ -27,5 +27,4 @@ if not go2rtc_config.get("log", {}).get("format"): if not go2rtc_config.get("webrtc", {}).get("candidates", []): go2rtc_config["webrtc"] = {"candidates": ["stun:8555"]} -with open('/usr/local/go2rtc/bin/config.yaml', 'w') as yaml_file: - yaml.dump(go2rtc_config, yaml_file) \ No newline at end of file +print(yaml.dump(go2rtc_config, default_flow_style=False)) \ No newline at end of file