Archived
1
0
Fork 0

weewx-dwd: Fix paths

This commit is contained in:
Daniel Kempkens 2022-12-22 23:36:24 +01:00
parent 3b8eeca7da
commit 30d06072c0
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
2 changed files with 6 additions and 0 deletions

View file

@ -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}

View file

@ -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