mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 18:31:02 +01:00
Added ssl
This commit is contained in:
@@ -1,4 +1,22 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
#clean HTTPS data
|
||||
sed -i '/HTTPS/d' /config/qBittorrent/qBittorrent.conf
|
||||
|
||||
bashio::config.require.ssl
|
||||
if bashio::config.true 'ssl'; then
|
||||
bashio::log.info "ssl enabled. If webui don't work, disable ssl or check your certificate paths"
|
||||
#set variables
|
||||
CERTFILE=$(bashio::config 'certfile')
|
||||
KEYFILE=$(bashio::config 'keyfile')
|
||||
#Check if certificates exist
|
||||
if [ bashio::fs.file_exists "$CERTFILE" ] && [ bashio::fs.file_exists "$KEYFILE" ]; then
|
||||
echo 'WebUI\HTTPS\Enabled=True' >> /config/qbittorrent.conf
|
||||
echo "WebUI\HTTPS\CertificatePath=$CERTFILE" >> /config/qbittorrent.conf
|
||||
echo "WebUI\HTTPS\KeyPath=$KEYFILE" >> /config/qbittorrent.conf
|
||||
else bashio::log.error "Certificates not found in $CERTFILE and/or $KEYFILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
bashio::log.info "Default username/password : admin/adminadmin"
|
||||
bashio::log.info "Configuration can be found in /config/qBittorrent"
|
||||
|
||||
Reference in New Issue
Block a user