Created
November 23, 2015 12:52
-
-
Save jpawlowski/a5a9ba276c3c87bb486b to your computer and use it in GitHub Desktop.
Update weather maps from DWD servers for use with FHEM GDS module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p /tmp/gds | |
# ftp-Server als Verzeichnis mounten: | |
curlftpfs ftp-outgoing2.dwd.de /tmp/gds -o user=user:password | |
cd /tmp/gds/gds/specials/radar/southeast | |
NEUESTE_DATEI=$(ls -t | head -n 1) | |
cp -fpv "${NEUESTE_DATEI}" "/tmp/gds_radarmap.jpg" | |
cd /tmp/gds/gds/specials/observations/maps/germany | |
NEUESTE_DATEI=$(ls -t Suedost* | head -n 1) | |
cp -fpv "${NEUESTE_DATEI}" "/tmp/gds_conditionsmap.jpg" | |
cd /tmp/gds/gds/specials/warnings/maps | |
NEUESTE_DATEI=SchilderMS.jpg | |
cp -fpv "${NEUESTE_DATEI}" "/tmp/gds_warningsmap.jpg" | |
cd /tmp/gds/gds/specials/forecasts/maps/germany | |
cp -fpv Suedost_* /tmp | |
cp -fpv Deutschland_* /tmp | |
# unmount | |
sleep 3 | |
fusermount -u -z /tmp/gds && rmdir /tmp/gds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment