mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-09 17:31:03 +01:00
SC2236
This commit is contained in:
@@ -26,7 +26,7 @@ done
|
||||
################
|
||||
# Set timezone #
|
||||
################
|
||||
if [ ! -z "TZ" ] && [ -f /etc/localtime ]; then
|
||||
if [ -n "TZ" ] && [ -f /etc/localtime ]; then
|
||||
if [ -f /usr/share/zoneinfo/"$TZ" ]; then
|
||||
echo "Timezone set from $(cat /etc/timezone) to $TZ"
|
||||
ln -snf /usr/share/zoneinfo/"$TZ" /etc/localtime && echo "$TZ" >/etc/timezone
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bashio
|
||||
|
||||
# Autodefine if not defined
|
||||
if [ ! -z INTERFACE_NAME ]; then
|
||||
export INTERFACE_NAME=$(ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p')
|
||||
bashio::log.blue "Autodetection : INTERFACE_NAME=$INTERFACE_NAME"
|
||||
if [ -n INTERFACE_NAME ]; then
|
||||
export INTERFACE_NAME=$(ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p')
|
||||
bashio::log.blue "Autodetection : INTERFACE_NAME=$INTERFACE_NAME"
|
||||
fi
|
||||
|
||||
bashio::log.info "Starting..."
|
||||
|
||||
@@ -28,7 +28,7 @@ echo "... adding ssl certs in files"
|
||||
for NGINXFILE in "/defaults/default" "/config/nginx/site-confs/default" "/data/config/nginx/site-confs/default"; do
|
||||
if [ -f $NGINXFILE ]; then
|
||||
LINE=$(sed -n "/ssl_certificate /=" $NGINXFILE)
|
||||
if [ ! -z $LINE ]; then
|
||||
if [ -n $LINE ]; then
|
||||
sed -i "/ssl_certificate/ d" $NGINXFILE
|
||||
sed -i "$LINE i ssl_certificate_key /ssl/$KEYFILE;" $NGINXFILE
|
||||
sed -i "$LINE i ssl_certificate /ssl/$CERTFILE;" $NGINXFILE
|
||||
|
||||
@@ -32,7 +32,7 @@ if bashio::config.true 'Full_Text_Search'; then
|
||||
APPS=(fulltextsearch fulltextsearch_elasticsearch files_fulltextsearch)
|
||||
for app in "${APPS[@]}"; do
|
||||
# If app exists, remove it
|
||||
[ ! -z $($LAUNCHER app:getpath $app) ] && $LAUNCHER app:remove $app &>/dev/null
|
||||
[ -n $($LAUNCHER app:getpath $app) ] && $LAUNCHER app:remove $app &>/dev/null
|
||||
done
|
||||
|
||||
# Get Full Text Search app for nextcloud
|
||||
|
||||
Reference in New Issue
Block a user