mirror of https://github.com/tteck/Proxmox.git
Compare commits
3 Commits
4bbbcd2fea
...
c10678e251
Author | SHA1 | Date |
---|---|---|
|
c10678e251 | |
|
3b1560fa63 | |
|
c64c8d5adf |
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -18,7 +18,7 @@ PCT_OPTIONS="
|
||||||
-cores 2
|
-cores 2
|
||||||
-memory 2048
|
-memory 2048
|
||||||
-password $PASS
|
-password $PASS
|
||||||
-net0 name=eth0,bridge=vmbr0,hwaddr=AE:1A:60:07:B7:59,ip=dhcp
|
-net0 name=eth0,bridge=vmbr0,ip=dhcp
|
||||||
-unprivileged 1
|
-unprivileged 1
|
||||||
"
|
"
|
||||||
DEFAULT_PCT_OPTIONS=(
|
DEFAULT_PCT_OPTIONS=(
|
||||||
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
|
@ -164,11 +164,12 @@ pct start "$CTID"
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# Get container IP
|
# Get container IP
|
||||||
|
set +e
|
||||||
max_attempts=5
|
max_attempts=5
|
||||||
attempt=1
|
attempt=1
|
||||||
IP=""
|
IP=""
|
||||||
while [[ $attempt -le $max_attempts ]]; do
|
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
|
if [[ -n $IP ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
@ -183,6 +184,7 @@ if [[ -z $IP ]]; then
|
||||||
IP="NOT FOUND"
|
IP="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
# Start Proxmox VE Monitor-All if available
|
# Start Proxmox VE Monitor-All if available
|
||||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
|
|
Loading…
Reference in New Issue