Skip to content

Commit

Permalink
Fix IN_IFACE in install.sh and vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
dimrozakis committed Jul 29, 2016
1 parent 1fa8e06 commit 0f6f5a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
server.vm.provision "shell",
inline: "WEB_SOCKET=192.168.69.100:8080 " \
"VPN_IP=192.168.75.100 " \
"IN_IFACE=eth1 " \
"SOURCE_CIDRS=192.168.69.0/24 /vagrant/scripts/install.sh"
server.vm.provision "shell",
run: "always",
Expand Down
7 changes: 7 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ if [ -z "$SOURCE_CIDRS" ]; then
echo
fi

if [ -z "$IN_IFACE" ]; then
echo "Please enter the lan interface of the server:"
read IN_IFACE
echo
fi

echo "Installing vpn-proxy from $DIR."
echo "Webserver will be listening to $WEB_SOCKET."
echo "VPN server will be listening to $VPN_IP."
Expand All @@ -37,6 +43,7 @@ pip install -U django netaddr ipython

echo "VPN_SERVER_REMOTE_ADDRESS = \"$VPN_IP\"" > $DIR/vpn-proxy/conf.d/0000-vpn-ip.py
echo "SOURCE_CIDRS = \"$SOURCE_CIDRS\"" | tr -s ' ' > $DIR/vpn-proxy/conf.d/0001-src-cidrs.py
echo "IN_IFACE = \"$IN_IFACE\"" > $DIR/vpn-proxy/conf.d/0002-lan-iface.py

$DIR/vpn-proxy/manage.py migrate
$DIR/vpn-proxy/manage.py autosuperuser
Expand Down

0 comments on commit 0f6f5a3

Please sign in to comment.