An alternative method for acquiring the IP address in the TurnKey scripts.

pull/1851/head
tteckster 1 year ago committed by GitHub
parent c64c8d5adf
commit 3b1560fa63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

@ -168,7 +168,7 @@ max_attempts=5
attempt=1
IP=""
while [[ $attempt -le $max_attempts ]]; do
IP=$(pct exec $CTID ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
IP=$(pct exec $CTID ip a show dev eth0 | grep -oP 'inet \K[^/]+')
if [[ -n $IP ]]; then
break
else

Loading…
Cancel
Save

Powered by BW's shoe-string budget.