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