mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-29 00:02:18 +00:00
Moved echo to file statements to front, add missing
fixed a typo replaced tabs with spaces
This commit is contained in:
parent
5b5129f1bc
commit
7315353179
1 changed files with 13 additions and 6 deletions
|
@ -1084,21 +1084,19 @@ 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
|
||||||
confNetwork
|
confNetwork
|
||||||
confOVPN
|
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'${OVPNDNS1}'\"/' /etc/openvpn/server.conf
|
||||||
$SUDO sed -i '0,/\(dhcp-option DNS \)/! s/\(dhcp-option DNS \).*/\1'${OVPNDNS2}'\"/' /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} for use in the rest of the functions.
|
||||||
source ${setupVars}
|
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
|
# Only try to set static on Raspbian
|
||||||
if [[ $PLAT != "Raspbian" ]]; then
|
if [[ $PLAT != "Raspbian" ]]; then
|
||||||
echo "::: IP Information"
|
echo "::: IP Information"
|
||||||
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue