diff --git a/cloudcommander/rootfs/entrypoint.sh b/cloudcommander/rootfs/entrypoint.sh index 8c723434b..635dbc865 100644 --- a/cloudcommander/rootfs/entrypoint.sh +++ b/cloudcommander/rootfs/entrypoint.sh @@ -15,13 +15,13 @@ mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE}) for KEYS in ${arr[@]}; do # export key VALUE=$(jq .$KEYS ${JSONSOURCE}) - export ${KEYS}=${VALUE//[\"\']/} + export ${KEYS}=${VALUE//[\"\']/} &>/dev/null done ################ # Set timezone # ################ -if [ ! -z "TZ" ]; then +if [ ! -z "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/enedisgateway2mqtt/rootfs/entrypoint.sh b/enedisgateway2mqtt/rootfs/entrypoint.sh index 8c723434b..635dbc865 100644 --- a/enedisgateway2mqtt/rootfs/entrypoint.sh +++ b/enedisgateway2mqtt/rootfs/entrypoint.sh @@ -15,13 +15,13 @@ mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE}) for KEYS in ${arr[@]}; do # export key VALUE=$(jq .$KEYS ${JSONSOURCE}) - export ${KEYS}=${VALUE//[\"\']/} + export ${KEYS}=${VALUE//[\"\']/} &>/dev/null done ################ # Set timezone # ################ -if [ ! -z "TZ" ]; then +if [ ! -z "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/filebrowser/rootfs/entrypoint.sh b/filebrowser/rootfs/entrypoint.sh index 8c723434b..635dbc865 100644 --- a/filebrowser/rootfs/entrypoint.sh +++ b/filebrowser/rootfs/entrypoint.sh @@ -15,13 +15,13 @@ mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE}) for KEYS in ${arr[@]}; do # export key VALUE=$(jq .$KEYS ${JSONSOURCE}) - export ${KEYS}=${VALUE//[\"\']/} + export ${KEYS}=${VALUE//[\"\']/} &>/dev/null done ################ # Set timezone # ################ -if [ ! -z "TZ" ]; then +if [ ! -z "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/gazpar2mqtt/rootfs/entrypoint.sh b/gazpar2mqtt/rootfs/entrypoint.sh index 8c723434b..635dbc865 100644 --- a/gazpar2mqtt/rootfs/entrypoint.sh +++ b/gazpar2mqtt/rootfs/entrypoint.sh @@ -15,13 +15,13 @@ mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE}) for KEYS in ${arr[@]}; do # export key VALUE=$(jq .$KEYS ${JSONSOURCE}) - export ${KEYS}=${VALUE//[\"\']/} + export ${KEYS}=${VALUE//[\"\']/} &>/dev/null done ################ # Set timezone # ################ -if [ ! -z "TZ" ]; then +if [ ! -z "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