diff --git a/.templates/00-global_var.sh b/.templates/00-global_var.sh index c93e39c80..45743d7fc 100644 --- a/.templates/00-global_var.sh +++ b/.templates/00-global_var.sh @@ -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 diff --git a/arpspoof/rootfs/etc/cont-init.d/99-run.sh b/arpspoof/rootfs/etc/cont-init.d/99-run.sh index 189fe4877..1e1e35545 100644 --- a/arpspoof/rootfs/etc/cont-init.d/99-run.sh +++ b/arpspoof/rootfs/etc/cont-init.d/99-run.sh @@ -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..." diff --git a/nextcloud/rootfs/etc/cont-init.d/30-keygen.sh b/nextcloud/rootfs/etc/cont-init.d/30-keygen.sh index 6407eaa9a..f41d265a7 100644 --- a/nextcloud/rootfs/etc/cont-init.d/30-keygen.sh +++ b/nextcloud/rootfs/etc/cont-init.d/30-keygen.sh @@ -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 diff --git a/nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh b/nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh index f95f6b56c..d7da6278b 100644 --- a/nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh +++ b/nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh @@ -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