mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
WireGuard on arm with Ubuntu 20.04 Focal Fosa
Allow install WireGuard on arm devices with Ubuntu 20.04 Focal Fosa
This commit is contained in:
parent
6099ea34ca
commit
d3992b3ff9
1 changed files with 9 additions and 7 deletions
|
@ -16,7 +16,7 @@
|
||||||
pivpnGitUrl="https://github.com/pivpn/pivpn.git"
|
pivpnGitUrl="https://github.com/pivpn/pivpn.git"
|
||||||
#pivpnGitUrl="/home/pi/repos/pivpn"
|
#pivpnGitUrl="/home/pi/repos/pivpn"
|
||||||
setupVarsFile="setupVars.conf"
|
setupVarsFile="setupVars.conf"
|
||||||
setupConfigDir="/etc/pivpn"
|
setupConfigDir="/etc/pivpn"
|
||||||
tempsetupVarsFile="/tmp/setupVars.conf"
|
tempsetupVarsFile="/tmp/setupVars.conf"
|
||||||
pivpnFilesDir="/usr/local/src/pivpn"
|
pivpnFilesDir="/usr/local/src/pivpn"
|
||||||
pivpnScriptDir="/opt/pivpn"
|
pivpnScriptDir="/opt/pivpn"
|
||||||
|
@ -129,9 +129,9 @@ main(){
|
||||||
setupVars="${setupConfigDir}/wireguard/${setupVarsFile}"
|
setupVars="${setupConfigDir}/wireguard/${setupVarsFile}"
|
||||||
elif [ -r "${setupConfigDir}/openvpn/${setupVarsFile}" ]; then
|
elif [ -r "${setupConfigDir}/openvpn/${setupVarsFile}" ]; then
|
||||||
setupVars="${setupConfigDir}/openvpn/${setupVarsFile}"
|
setupVars="${setupConfigDir}/openvpn/${setupVarsFile}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -r "$setupVars" ]; then
|
if [ -r "$setupVars" ]; then
|
||||||
if [[ "${reconfigure}" == true ]]; then
|
if [[ "${reconfigure}" == true ]]; then
|
||||||
echo "::: --reconfigure passed to install script, will reinstall PiVPN overwriting existing settings"
|
echo "::: --reconfigure passed to install script, will reinstall PiVPN overwriting existing settings"
|
||||||
UpdateCmd="Reconfigure"
|
UpdateCmd="Reconfigure"
|
||||||
|
@ -150,7 +150,7 @@ main(){
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "$UpdateCmd" = "Repair" ]; then
|
elif [ "$UpdateCmd" = "Repair" ]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "$setupVars"
|
source "$setupVars"
|
||||||
runUnattended=true
|
runUnattended=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ main(){
|
||||||
echo "INSTALLED_PACKAGES=(${INSTALLED_PACKAGES[*]})" >> ${tempsetupVarsFile}
|
echo "INSTALLED_PACKAGES=(${INSTALLED_PACKAGES[*]})" >> ${tempsetupVarsFile}
|
||||||
echo "::: Setupfiles copied to ${setupConfigDir}/${VPN}/${setupVarsFile}"
|
echo "::: Setupfiles copied to ${setupConfigDir}/${VPN}/${setupVarsFile}"
|
||||||
$SUDO mkdir "${setupConfigDir}/${VPN}/"
|
$SUDO mkdir "${setupConfigDir}/${VPN}/"
|
||||||
$SUDO cp ${tempsetupVarsFile} "${setupConfigDir}/${VPN}/${setupVarsFile}"
|
$SUDO cp ${tempsetupVarsFile} "${setupConfigDir}/${VPN}/${setupVarsFile}"
|
||||||
|
|
||||||
installScripts
|
installScripts
|
||||||
|
|
||||||
|
@ -1068,7 +1068,8 @@ installPiVPN(){
|
||||||
|
|
||||||
askWhichVPN(){
|
askWhichVPN(){
|
||||||
if [ "${runUnattended}" = 'true' ]; then
|
if [ "${runUnattended}" = 'true' ]; then
|
||||||
if [ "$PLAT" = "Raspbian" ] || [ "$X86_SYSTEM" -eq 1 ]; then
|
# [ "$OSCN" = "focal" ] > WireGuard is supported in Ubuntu 20.04 on all architectures
|
||||||
|
if [ "$PLAT" = "Raspbian" ] || [ "$OSCN" = "focal" ] || [ "$X86_SYSTEM" -eq 1 ]; then
|
||||||
if [ -z "$VPN" ]; then
|
if [ -z "$VPN" ]; then
|
||||||
echo ":: No VPN protocol specified, using WireGuard"
|
echo ":: No VPN protocol specified, using WireGuard"
|
||||||
VPN="wireguard"
|
VPN="wireguard"
|
||||||
|
@ -1098,7 +1099,8 @@ askWhichVPN(){
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ "$PLAT" = "Raspbian" ] || [ "$X86_SYSTEM" -eq 1 ]; then
|
# [ "$OSCN" = "focal" ] > WireGuard is supported in Ubuntu 20.04 on all architectures
|
||||||
|
if [ "$PLAT" = "Raspbian" ] || [ "$OSCN" = "focal" ] || [ "$X86_SYSTEM" -eq 1 ]; then
|
||||||
chooseVPNCmd=(whiptail --backtitle "Setup PiVPN" --title "Installation mode" --separate-output --radiolist "WireGuard is a new kind of VPN that provides near-instantaneous connection speed, high performance, and modern cryptography.\\n\\nIt's the recommended choice especially if you use mobile devices where WireGuard is easier on battery than OpenVPN.\\n\\nOpenVPN is still available if you need the traditional, flexible, trusted VPN protocol or if you need features like TCP and custom search domain.\\n\\nChoose a VPN (press space to select):" "${r}" "${c}" 2)
|
chooseVPNCmd=(whiptail --backtitle "Setup PiVPN" --title "Installation mode" --separate-output --radiolist "WireGuard is a new kind of VPN that provides near-instantaneous connection speed, high performance, and modern cryptography.\\n\\nIt's the recommended choice especially if you use mobile devices where WireGuard is easier on battery than OpenVPN.\\n\\nOpenVPN is still available if you need the traditional, flexible, trusted VPN protocol or if you need features like TCP and custom search domain.\\n\\nChoose a VPN (press space to select):" "${r}" "${c}" 2)
|
||||||
VPNChooseOptions=(WireGuard "" on
|
VPNChooseOptions=(WireGuard "" on
|
||||||
OpenVPN "" off)
|
OpenVPN "" off)
|
||||||
|
|
Loading…
Reference in a new issue