Update defaults.inc
This commit is contained in:
13
defaults.inc
13
defaults.inc
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='5.5.31-06282025'
|
||||
VERS='5.5.32-06292025'
|
||||
NM_BETA=false
|
||||
|
||||
noheader=' test service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log betacheck offsite-staticroute-fix '
|
||||
@@ -10,9 +10,16 @@ declare -i errtime
|
||||
[ "${NM_FOLDER}" == "" ] && NM_FOLDER=/opt/idssys/nodemgmt
|
||||
NM_SRVCOPT=(start stop restart reload enable disable)
|
||||
|
||||
TSI=$(/sbin/ip link | grep tailscale0) && [ ${#TSI} != 0 ] && RUN_NODE_TSIP=$(/sbin/ip -o -4 addr list tailscale0 | awk '{print $4}' | cut -d/ -f1) || RUN_NODE_TSIP=
|
||||
[ "$(ip route | awk '/default/ { print $5 }')" == "link" ] && RNIP=$(ip addr show $(ip route | awk '/1 dev eth0/ { print $5; exit }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) ||
|
||||
TSI=$(/sbin/ip link | grep tailscale0)
|
||||
[ ${#TSI} != 0 ] && RUN_NODE_TSIP=$(/sbin/ip -o -4 addr list tailscale0 | awk '{print $4}' | cut -d/ -f1) || RUN_NODE_TSIP=""
|
||||
|
||||
if [ "$(ip route | awk '/default/ { print $5 }')" == "link" ]; then
|
||||
RNIP=$(ip addr show $(ip route | awk '/1 dev eth0/ { print $5; exit }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
|
||||
elif [ "$(ip a | grep "10.55.55.")" ]; then
|
||||
RNIP=$(ip a | awk '/wg0/' | grep "inet" | awk '/inet/ {print $2}' | cut -d'/' -f1)
|
||||
else
|
||||
RNIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
|
||||
fi
|
||||
|
||||
if [ -f ${NM_FOLDER}/conf/defaults.local.inc ]; then
|
||||
declare -A NM_HOSTS
|
||||
|
||||
Reference in New Issue
Block a user