From 30d06072c00222095a8aec1e19f6af75b5a44304 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Thu, 22 Dec 2022 23:36:24 +0100 Subject: [PATCH] weewx-dwd: Fix paths --- Dockerfile | 3 +++ entrypoint.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5709b37..9aecc0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,6 +55,9 @@ RUN wget -nv -O icons-dwd.zip "https://www.dwd.de/DE/wetter/warnungen_aktuell/ob # Adjust (some) file content and permissions RUN sed -i -z -e "s|PTH=\"/etc/weewx/skins/Belchertown/dwd\"|PTH=\"/home/weewx/skins/weewx-wdc/dwd\"|g" /tmp/weewx-dwd/weewx-DWD-master/usr/local/bin/wget-dwd &&\ sed -i -z -e "s|config = configobj.ConfigObj(\"/etc/weewx/weewx.conf\")|config = configobj.ConfigObj(\"/data/weewx.conf\")|g" /tmp/weewx-dwd/weewx-DWD-master/usr/local/bin/dwd-warnings &&\ + sed -i -z -e "s|#!/usr/bin/python3|#!/usr/bin/env python3|g" /tmp/weewx-dwd/weewx-DWD-master/usr/local/bin/dwd-warnings &&\ + sed -i -z -e "s|#!/usr/bin/python3|#!/usr/bin/env python3|g" /tmp/weewx-dwd/weewx-DWD-master/usr/local/bin/dwd-cap-warnings &&\ + sed -i -z -e "s|#!/usr/bin/python3|#!/usr/bin/env python3|g" /tmp/weewx-dwd/weewx-DWD-master/usr/local/bin/dwd-mosmix &&\ chmod +x /tmp/weewx-dwd/weewx-DWD-master/usr/local/bin/* &&\ chown -R weewx:weewx ${WEEWX_HOME} diff --git a/entrypoint.sh b/entrypoint.sh index 0ae383d..6313b30 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -34,6 +34,9 @@ if [ "$(id -u)" = 0 ]; then fi chmod +x /etc/cron.hourly/* + # run cron tasks on startup + /etc/cron.hourly/dwd || true + # skin config: WDC rm -f ./skins/weewx-wdc/skin.conf if [ -e /data/skin-wdc/skin.conf ]; then