We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2d85f5 commit f936163Copy full SHA for f936163
wordpress-startup-script.sh
@@ -22,7 +22,10 @@ LETS_ENC="https://raw.githubusercontent.com/enoch85/wordpress-vm/master/lets-enc
22
fi
23
24
# Set correct interface
25
-sed -i "s|ens33|$IFACE|g" /etc/network/interfaces
+CURRENTIFACE1=$(cat /etc/network/interfaces | sed -n '/lo/,/iface/p' | awk '{print $3}'| sed "3d" | sed "1d")
26
+CURRENTIFACE2=$(cat /etc/network/interfaces | sed -n '/iface/,/inet/p' | awk '{print $2}' | sed "1d" | sed "2d" | sed "1d")
27
+sed -i "s|$CURRENTIFACE1|$IFACE|g" /etc/network/interfaces
28
+sed -i "s|$CURRENTIFACE2|$IFACE|g" /etc/network/interfaces
29
service networking restart
30
31
# Check network
0 commit comments