From 509b885dc84067e531c3d52649f5775ceb3522b8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:00:09 +0200 Subject: [PATCH] Update tools.func --- misc/tools.func | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 262921f..603e026 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -715,19 +715,19 @@ EOF systemctl daemon-reexec systemctl daemon-reload - systemctl enable --now update-local-ip.timer + systemctl enable -q --now update-local-ip.timer msg_ok "Setup LOCAL_IP helper in $BASE_DIR with systemd integration" } import_local_ip() { - setup_local_ip_helper local IP_FILE="/run/local-ip.env" if [[ -f "$IP_FILE" ]]; then + # shellcheck disable=SC1090 source "$IP_FILE" fi - if [[ -z "$LOCAL_IP" ]]; then + if [[ -z "${LOCAL_IP:-}" ]]; then LOCAL_IP="$(ip route get 1 | awk '{print $7; exit}' 2>/dev/null)" if [[ -z "$LOCAL_IP" ]]; then msg_error "Could not determine LOCAL_IP"