Skip to content

Commit c51df21

Browse files
author
enoch85
committed
update networking
1 parent f936163 commit c51df21

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

wordpress-startup-script.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ LETS_ENC="https://raw.githubusercontent.com/enoch85/wordpress-vm/master/lets-enc
2222
fi
2323

2424
# Set correct interface
25-
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
25+
# Set correct interface
26+
{ sed '/# The primary network interface/q' /etc/network/interfaces; printf 'auto %s\niface %s inet dhcp\n# This is an autoconfigured IPv6 interface\niface %s inet6 auto\n' "$IFACE" "$IFACE" "$IFACE"; } > /etc/network/interfaces.new
27+
mv /etc/network/interfaces.new /etc/network/interfaces
2928
service networking restart
3029

3130
# Check network

wordpress_install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ sleep 3
221221
wp plugin install --allow-root twitter-tweets --activate
222222
wp plugin install --allow-root social-pug --activate
223223
wp plugin install --allow-root wp-mail-smtp --activate
224+
wp plugin install --allow-root captcha --activate
225+
wp plugin install --allow-root redis-cache --activate
224226

225227
# set pretty urls
226228
wp rewrite structure '/%postname%/' --hard --allow-root

0 commit comments

Comments
 (0)