mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-09 17:15:57 +02:00
Update 50-configuration.sh
This commit is contained in:
@@ -1,22 +1,3 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/bin/sh
|
||||||
|
|
||||||
if [ bashio::config.exists 'certfile' ] && [ bashio::config.exists 'keyfile' ]; then
|
echo "Default username/password : admin/adminadmin"
|
||||||
#Set variables
|
|
||||||
CERTFILE=$(bashio::config 'certfile')
|
|
||||||
KEYFILE=$(bashio::config 'keyfile')
|
|
||||||
bashio::log.info "Ssl certificates options were set..."
|
|
||||||
bashio::log.info "... cleaning previous information"
|
|
||||||
sed -i '/HTTPS/d' /config/qBittorrent/qBittorrent.conf
|
|
||||||
|
|
||||||
#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
|
|
||||||
bashio::log.info "... and certificates were set"
|
|
||||||
else
|
|
||||||
bashio::log.info "... but certificates not found in $CERTFILE and/or $KEYFILE "
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
bashio::log.info "Default username/password : admin/adminadmin"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user