mirror of
https://github.com/ViViDboarder/hassio-addon-rclone.git
synced 2024-11-15 09:46:36 +00:00
21 lines
743 B
Bash
Executable File
21 lines
743 B
Bash
Executable File
#! /usr/bin/with-contenv bashio
|
|
|
|
bashio::log.info "Configuring rclone..."
|
|
|
|
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
|
|
|
|
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
|
|
crontab -l
|