mirror of
https://github.com/meienberger/runtipi.git
synced 2024-10-05 08:07:18 +03:00
Fix TZ detection [skip ci]
This commit is contained in:
parent
370688d20f
commit
d52c6061fb
@ -60,6 +60,7 @@ NETWORK_INTERFACE="$(ip route | grep default | awk '{print $5}' | uniq)"
|
|||||||
INTERNAL_IP="$(ip addr show "${NETWORK_INTERFACE}" | grep "inet " | awk '{print $2}' | cut -d/ -f1)"
|
INTERNAL_IP="$(ip addr show "${NETWORK_INTERFACE}" | grep "inet " | awk '{print $2}' | cut -d/ -f1)"
|
||||||
DNS_IP=9.9.9.9 # Default to Quad9 DNS
|
DNS_IP=9.9.9.9 # Default to Quad9 DNS
|
||||||
ARCHITECTURE="$(uname -m)"
|
ARCHITECTURE="$(uname -m)"
|
||||||
|
TZ="$(timedatectl | grep "Time zone" | awk '{print $3}' || Europe/Berlin)"
|
||||||
|
|
||||||
if [[ "$ARCHITECTURE" == "aarch64" ]]; then
|
if [[ "$ARCHITECTURE" == "aarch64" ]]; then
|
||||||
ARCHITECTURE="arm64"
|
ARCHITECTURE="arm64"
|
||||||
@ -98,8 +99,6 @@ function derive_entropy() {
|
|||||||
printf "%s" "${identifier}" | openssl dgst -sha256 -hmac "${tipi_seed}" | sed 's/^.* //'
|
printf "%s" "${identifier}" | openssl dgst -sha256 -hmac "${tipi_seed}" | sed 's/^.* //'
|
||||||
}
|
}
|
||||||
|
|
||||||
TZ="$(timedatectl | grep "Time zone" | awk '{print $3}') || Europe/Berlin"
|
|
||||||
|
|
||||||
# Copy the app state if it isn't here
|
# Copy the app state if it isn't here
|
||||||
if [[ ! -f "${STATE_FOLDER}/apps.json" ]]; then
|
if [[ ! -f "${STATE_FOLDER}/apps.json" ]]; then
|
||||||
cp "${ROOT_FOLDER}/templates/apps-sample.json" "${STATE_FOLDER}/apps.json"
|
cp "${ROOT_FOLDER}/templates/apps-sample.json" "${STATE_FOLDER}/apps.json"
|
||||||
@ -137,7 +136,7 @@ ENV_FILE=$(mktemp)
|
|||||||
|
|
||||||
JWT_SECRET=$(derive_entropy "jwt")
|
JWT_SECRET=$(derive_entropy "jwt")
|
||||||
POSTGRES_PASSWORD=$(derive_entropy "postgres")
|
POSTGRES_PASSWORD=$(derive_entropy "postgres")
|
||||||
TIPI_VERSION=$(get_json_field "${ROOT_FOLDER}/package.json" version)
|
TIPI_VERSION=$(get_json_field "${ROOT_FOLDER}/package.json" version)§
|
||||||
|
|
||||||
for template in ${ENV_FILE}; do
|
for template in ${ENV_FILE}; do
|
||||||
sed -i "s/<dns_ip>/${DNS_IP}/g" "${template}"
|
sed -i "s/<dns_ip>/${DNS_IP}/g" "${template}"
|
||||||
|
Loading…
Reference in New Issue
Block a user