Dateien nach "scripts" hochladen
This commit is contained in:
@@ -123,6 +123,7 @@ TUNCFG
|
||||
pct exec "$SEL_ID" -- bash -c "
|
||||
mkdir -p /opt/docker-projekte/VPN
|
||||
touch /opt/docker-projekte/VPN/custom.conf
|
||||
chmod -R 775 /opt/docker-projekte/VPN
|
||||
chown 1000:1000 -R /opt/docker-projekte/VPN
|
||||
"
|
||||
success "VPN-Ordner und custom.conf erstellt (/opt/docker-projekte/VPN)"
|
||||
@@ -195,7 +196,8 @@ deploy_stack() {
|
||||
|
||||
# Lokales Subnetz automatisch ermitteln (z.B. 192.168.178.0/24)
|
||||
local SUBNET
|
||||
SUBNET=$(pct exec "$SEL_ID" -- bash -c "ip -o -f inet addr show eth0 | awk '{print \$4}' | sed 's/\.[0-9]\{1,3\}\//.0\//'" 2>/dev/null || echo "192.168.0.0/24")
|
||||
#SUBNET=$(pct exec "$SEL_ID" -- bash -c "ip -o -f inet addr show eth0 | awk '{print \$4}' | sed 's/\.[0-9]\{1,3\}\//.0\//'" 2>/dev/null || echo "192.168.0.0/24")
|
||||
SUBNET=$(pct exec "$SEL_ID" -- bash -c "python3 -c 'import ipaddress; import subprocess; ip = subprocess.check_output([\"ip\", \"-o\", \"-f\", \"inet\", \"addr\", \"show\", \"eth0\"]).decode().split()[3]; print(ipaddress.ip_interface(ip).network)'" 2>/dev/null || echo "192.168.0.0/23")
|
||||
info "Ermitteltes lokales Subnetz: ${SUBNET}"
|
||||
|
||||
# Alten Stack stoppen
|
||||
|
||||
Reference in New Issue
Block a user