mirror of
https://github.com/ViViDboarder/hassio-addon-rclone.git
synced 2024-11-05 21:06:37 +00:00
27 lines
676 B
Plaintext
Executable File
27 lines
676 B
Plaintext
Executable File
#! /usr/bin/with-contenv bashio
|
|
|
|
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
|
|
# Maybe switch to --rc-no-auth and use proxy
|
|
username=$(bashio::config 'credentials.username')
|
|
password=$(bashio::config 'credentials.password')
|
|
|
|
exec rclone rcd \
|
|
--rc-web-gui \
|
|
--rc-serve \
|
|
--rc-addr :5572 \
|
|
--rc-user "$username" \
|
|
--rc-pass "$password" \
|
|
--rc-web-gui-update \
|
|
--rc-web-gui-no-open-browser \
|
|
"${ssl_flags[@]}"
|