From 7315353179a8bca7b337e90d9a6f10412c26d0c1 Mon Sep 17 00:00:00 2001 From: EWouters Date: Tue, 14 Mar 2017 15:25:39 +1300 Subject: [PATCH] Moved echo to file statements to front, add missing fixed a typo replaced tabs with spaces --- auto_install/install.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 7dfcf30..0d7cf15 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -1084,21 +1084,19 @@ updatePiVPN() { installScripts # setCustomProto - echo "${pivpnProto}" > /tmp/pivpnPROTO # write out the PROTO PROTO=$pivpnProto $SUDO cp /tmp/pivpnPROTO /etc/pivpn/INSTALL_PROTO #setCustomPort # write out the port - echo ${PORT} > /tmp/INSTALL_PORT $SUDO cp /tmp/INSTALL_PORT /etc/pivpn/INSTALL_PORT confOpenVPN confNetwork confOVPN - # ?? Is this always OK? Also if you only select one DNS server ?? + # ?? Is this always OK? Also if you only select one DNS server ?? $SUDO sed -i '0,/\(dhcp-option DNS \)/ s/\(dhcp-option DNS \).*/\1'${OVPNDNS1}'\"/' /etc/openvpn/server.conf $SUDO sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /etc/openvpn/server.conf @@ -1258,8 +1256,17 @@ main() { # Source ${setupVars} for use in the rest of the functions. source ${setupVars} - echo "${pivpnInterface}" > /tmp/pivpnINT - + echo "::: Using IP address: $IPv4addr" + echo "${IPv4addr%/*}" > /tmp/pivpnIP + echo "::: Using interface: $pivpnInterface" + echo "${pivpnInterface}" > /tmp/pivpnINT + echo "::: Using User: $pivpnUser" + echo "${pivpnUser}" > /tmp/pivpnUSR + echo "::: Using protocol: $pivpnProto" + echo "${pivpnProto}" > /tmp/pivpnPROTO + echo "::: Using port: $PORT" + echo ${PORT} > /tmp/INSTALL_PORT + # Only try to set static on Raspbian if [[ $PLAT != "Raspbian" ]]; then echo "::: IP Information" @@ -1309,6 +1316,6 @@ main() { echo "::: The install log is located at: ${instalLogLoc}" } -if [[ "${PVPN_TEST}" != true ]] ; then +if [[ "${PIVPN_TEST}" != true ]] ; then main "$@" fi