mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
bash_completion not used in dual
This commit is contained in:
parent
4e3a57b9aa
commit
e700cf1c8f
1 changed files with 15 additions and 6 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
######## VARIABLES #########
|
||||
#pivpnGitUrl="https://github.com/pivpn/pivpn.git"
|
||||
pivpnGitUrl="/home/pi/repos/pivpn"
|
||||
pivpnGitUrl="/home/ubuntu/repos/pivpn"
|
||||
setupVarsFile="setupVars.conf"
|
||||
setupConfigDir="/etc/pivpn"
|
||||
tempsetupVarsFile="/tmp/setupVars.conf"
|
||||
|
@ -2249,16 +2249,25 @@ installScripts(){
|
|||
else
|
||||
othervpn='wireguard'
|
||||
fi
|
||||
|
||||
if [ -r "${setupConfigDir}/${othervpn}/${setupVarsFile}" ]; then
|
||||
# both are installed
|
||||
# dont need a link, copy the common script to the location instead
|
||||
$SUDO rm -f /usr/local/bin/pivpn
|
||||
$SUDO install -m 755 -t /usr/local/bin /${pivpnFilesDir}/scripts/pivpn
|
||||
fi
|
||||
|
||||
if [ -r "${setupConfigDir}/${othervpn}/${setupVarsFile}" ]; then
|
||||
# both are installed, no bash completion, delete if already there
|
||||
$SUDO rm -f /etc/bash_completion.d/pivpn
|
||||
else
|
||||
# only one protocol is installed, put bash completion in place
|
||||
$SUDO cp "${pivpnFilesDir}/scripts/${VPN}/bash-completion" /etc/bash_completion.d/pivpn
|
||||
$SUDO chown root:root /etc/bash_completion.d/pivpn
|
||||
$SUDO chmod 755 /etc/bash_completion.d/pivpn
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/bash_completion.d/pivpn
|
||||
fi
|
||||
echo " done."
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue