mirror of
https://github.com/ViViDboarder/hassio-addon-rclone.git
synced 2024-12-22 03:27:44 +00:00
Start config validation and ssl
ssl doesn't seem to work right now, so stick to ingress
This commit is contained in:
parent
e03459a288
commit
100f24ddfd
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
bashio::log.info "Configuring rclone..."
|
bashio::log.info "Configuring rclone..."
|
||||||
|
|
||||||
|
bashio::config.require.username 'credentials.username'
|
||||||
|
bashio::config.require.password 'credentials.password'
|
||||||
|
|
||||||
|
bashio::config.suggest.true 'tls.ssl'
|
||||||
|
bashio::config.require.ssl 'tls' 'tls.certfile' 'tls.keyfile'
|
||||||
|
|
||||||
sync_command=$(bashio::config 'sync_command')
|
sync_command=$(bashio::config 'sync_command')
|
||||||
destination=$(bashio::config 'destination')
|
destination=$(bashio::config 'destination')
|
||||||
|
|
||||||
|
@ -2,13 +2,19 @@
|
|||||||
|
|
||||||
bashio::log.info "Starting rclone web..."
|
bashio::log.info "Starting rclone web..."
|
||||||
|
|
||||||
|
# Configure tls
|
||||||
|
if bashio::config.true 'tls.ssl'; then
|
||||||
|
ssl_flags=(\
|
||||||
|
"--rc-cert" "/ssl/$(bashio::config 'tls.certfile')" \
|
||||||
|
"--rc-key" "/ssl/$(bashio::config 'tls.keyfile')" \
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO: Something with UN and PASS
|
# TODO: Something with UN and PASS
|
||||||
# Maybe switch to --rc-no-auth and use proxy
|
# Maybe switch to --rc-no-auth and use proxy
|
||||||
username=$(bashio::config 'credentials.username')
|
username=$(bashio::config 'credentials.username')
|
||||||
password=$(bashio::config 'credentials.password')
|
password=$(bashio::config 'credentials.password')
|
||||||
|
|
||||||
# TODO: Add cert paths here if ssl is true
|
|
||||||
|
|
||||||
exec rclone rcd \
|
exec rclone rcd \
|
||||||
--rc-web-gui \
|
--rc-web-gui \
|
||||||
--rc-serve \
|
--rc-serve \
|
||||||
@ -16,4 +22,5 @@ exec rclone rcd \
|
|||||||
--rc-user "$username" \
|
--rc-user "$username" \
|
||||||
--rc-pass "$password" \
|
--rc-pass "$password" \
|
||||||
--rc-web-gui-update \
|
--rc-web-gui-update \
|
||||||
--rc-web-gui-no-open-browser
|
--rc-web-gui-no-open-browser \
|
||||||
|
"${ssl_flags[@]}"
|
||||||
|
Loading…
Reference in New Issue
Block a user