Moved echo to file statements to front, add missing

fixed a typo
replaced tabs with spaces
This commit is contained in:
EWouters 2017-03-14 15:25:39 +13:00
parent 5b5129f1bc
commit 7315353179

View file

@ -1084,14 +1084,12 @@ updatePiVPN() {
installScripts installScripts
# setCustomProto # setCustomProto
echo "${pivpnProto}" > /tmp/pivpnPROTO
# write out the PROTO # write out the PROTO
PROTO=$pivpnProto PROTO=$pivpnProto
$SUDO cp /tmp/pivpnPROTO /etc/pivpn/INSTALL_PROTO $SUDO cp /tmp/pivpnPROTO /etc/pivpn/INSTALL_PROTO
#setCustomPort #setCustomPort
# write out the port # write out the port
echo ${PORT} > /tmp/INSTALL_PORT
$SUDO cp /tmp/INSTALL_PORT /etc/pivpn/INSTALL_PORT $SUDO cp /tmp/INSTALL_PORT /etc/pivpn/INSTALL_PORT
confOpenVPN confOpenVPN
@ -1258,7 +1256,16 @@ main() {
# Source ${setupVars} for use in the rest of the functions. # Source ${setupVars} for use in the rest of the functions.
source ${setupVars} source ${setupVars}
echo "::: Using IP address: $IPv4addr"
echo "${IPv4addr%/*}" > /tmp/pivpnIP
echo "::: Using interface: $pivpnInterface"
echo "${pivpnInterface}" > /tmp/pivpnINT 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 # Only try to set static on Raspbian
if [[ $PLAT != "Raspbian" ]]; then if [[ $PLAT != "Raspbian" ]]; then
@ -1309,6 +1316,6 @@ main() {
echo "::: The install log is located at: ${instalLogLoc}" echo "::: The install log is located at: ${instalLogLoc}"
} }
if [[ "${PVPN_TEST}" != true ]] ; then if [[ "${PIVPN_TEST}" != true ]] ; then
main "$@" main "$@"
fi fi