mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-03 20:48:46 +02:00
fix: auto-fix linting issues
This commit is contained in:
committed by
github-actions[bot]
parent
3539f328fb
commit
f5428e0950
@@ -4,22 +4,22 @@ set -e
|
||||
|
||||
if bashio::config.true 'use_own_certs'; then
|
||||
|
||||
bashio::log.green "Using referenced ssl certificates"
|
||||
CERTFILE=$(bashio::config 'certfile')
|
||||
KEYFILE=$(bashio::config 'keyfile')
|
||||
bashio::log.green "Using referenced ssl certificates"
|
||||
CERTFILE=$(bashio::config 'certfile')
|
||||
KEYFILE=$(bashio::config 'keyfile')
|
||||
|
||||
# Validate ssl
|
||||
bashio::config.require.ssl
|
||||
# Validate ssl
|
||||
bashio::config.require.ssl
|
||||
|
||||
#Check if files exist
|
||||
echo "... checking if referenced files exist"
|
||||
[ ! -f /ssl/"$CERTFILE" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$CERTFILE not found" && bashio::exit.nok
|
||||
[ ! -f /ssl/"$KEYFILE" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$KEYFILE not found" && bashio::exit.nok
|
||||
#Check if files exist
|
||||
echo "... checking if referenced files exist"
|
||||
[ ! -f /ssl/"$CERTFILE" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$CERTFILE not found" && bashio::exit.nok
|
||||
[ ! -f /ssl/"$KEYFILE" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$KEYFILE not found" && bashio::exit.nok
|
||||
|
||||
[[ -f /data/config/keys/cert.key ]] && rm /data/config/keys/cert.key
|
||||
[[ -f /data/config/keys/cert.crt ]] && rm /data/config/keys/cert.crt
|
||||
cp /ssl/"$CERTFILE" /data/config/keys/cert.crt
|
||||
cp /ssl/"$KEYFILE" /data/config/keys/cert.key
|
||||
echo "... done"
|
||||
[[ -f /data/config/keys/cert.key ]] && rm /data/config/keys/cert.key
|
||||
[[ -f /data/config/keys/cert.crt ]] && rm /data/config/keys/cert.crt
|
||||
cp /ssl/"$CERTFILE" /data/config/keys/cert.crt
|
||||
cp /ssl/"$KEYFILE" /data/config/keys/cert.key
|
||||
echo "... done"
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user