Files
hassio-addons/fireflyiii_fints_importer/rootfs/templates/cronupdate
Alexandre 8e035dde96 Restore
2023-11-21 09:53:56 +01:00

22 lines
742 B
Plaintext

#!/usr/bin/env bashio
# shellcheck shell=bash
set -e
PATHTOFILES="/data/configurations"
(
bashio::log.info "Running update according to defined schedule. Files located in $PATHTOFILES will be imported"
if bashio::config.true 'silent'; then
bashio::log.warning "Silent mode activated. Only errors will be shown. Please disable in addon options if you need to debug"
for config in "$PATHTOFILES"/*.json
do
curl --get --data-urlencode "automate=true" --data-urlencode "config=$config" http://localhost:8080 2> /dev/null
done
else
for config in "$PATHTOFILES"/*.json
do
curl -vvv --get --data-urlencode "automate=true" --data-urlencode "config=$config" http://localhost:8080
done
fi
) &>/proc/1/fd/1