This commit is contained in:
Alexandre
2022-01-17 13:33:12 +01:00
parent 4bca8e9d74
commit 0205346557
4 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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..."

View File

@@ -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

View File

@@ -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