hassio-addon-rclone/rclone/rootfs/etc/cont-init.d/rclone.sh

21 lines
743 B
Bash
Raw Normal View History

2021-06-14 21:48:31 +00:00
#! /usr/bin/with-contenv bashio
bashio::log.info "Configuring rclone..."
2023-12-07 17:12:19 +00:00
if bashio::config.true 'tls.ssl'; then
bashio::config.require.ssl 'tls' 'tls.certfile' 'tls.keyfile'
else
bashio::log.warning
bashio::log.warning "It's recommended to set tsl settings if exposing to the network and not through the proxy."
bashio::log.warning
fi
2023-12-07 17:12:19 +00:00
if ! bashio::config.has_value 'credentials.username' || ! bashio::config.has_value 'credentials.password'; then
bashio::log.warning
bashio::log.warning "It's recommended to set credentials.username and credentials.password settings if exposing to the network and not through the proxy."
bashio::log.warning
fi
echo "$(bashio::config 'cron') /run_rclone.sh" >> /etc/crontabs/root
2021-06-14 21:48:31 +00:00
crontab -l