ansible/playbooks/apps/templates/bin/download-eau-du-grand-lyon.j2

10 lines
346 B
Text
Raw Permalink Normal View History

2024-12-05 23:21:25 +01:00
#!/bin/bash
2024-12-08 18:40:36 +01:00
set -uo pipefail
2024-12-05 23:21:25 +01:00
2024-12-08 18:40:36 +01:00
pushd /mnt/data/paperless-ngx || exit 1
2024-12-05 23:21:25 +01:00
./downloader eau-du-grand-lyon -o consume -u '{{downloader_eau_lyon_username}}' -p '{{downloader_eau_lyon_password}}' --headless
2024-12-08 18:40:36 +01:00
status=$?
curl -X PUT -d 'source=eau-du-grand-lyon' "https://hass.augendre.info/api/webhook/{{ downloader_home_assistant_hook_id }}"
exit $status