install.sh path correct

This commit is contained in:
shelleycat485 2020-05-06 22:03:38 +01:00
parent e09bbda1e9
commit 052376a133

View file

@ -2244,16 +2244,17 @@ installScripts(){
fi fi
$SUDO install -v -m 755 -t ${pivpnScriptDir} ${pivpnFilesDir}/scripts/*.sh $SUDO install -v -m 755 -t ${pivpnScriptDir} ${pivpnFilesDir}/scripts/*.sh
$SUDO install -v -m 755 -t ${pivpnScriptDir}/${VPN} ${pivpnFilesDir}/scripts/${VPN}/*.sh $SUDO install -v -m 755 -t ${pivpnScriptDir}/${VPN} ${pivpnFilesDir}/scripts/${VPN}/*.sh
# line for the single command being installed # make a link for a single command being installed
$SUDO ln -s -T ${pivpnFilesDir}/scripts/${VPN}/pivpn pivpn $SUDO ln -s -T ${pivpnScriptDir}/${VPN}/pivpn.sh /usr/local/bin/pivpn
# if the other protocol file exists # if the other protocol file exists it has been installed
if [ ${VPN} -eq 'wireguard' ]; then if [[ ${VPN} == 'wireguard' ]]; then
othervpn='openvpn' othervpn='openvpn'
else else
othervpn='wireguard' othervpn='wireguard'
fi fi
if [ -r "${setupConfigDir}/${othervpn}/${setupVarsFile} ] then; if [ -r "${setupConfigDir}/${othervpn}/${setupVarsFile}" ]; then
# dont need a link, copy the common script to the location instead # dont need a link, copy the common script to the location instead
$SUDO rm -f /usr/local/bin/pivpn
$SUDO install -v -m 755 -t /usr/local/bin /${pivpnFilesDir}/scripts/pivpn $SUDO install -v -m 755 -t /usr/local/bin /${pivpnFilesDir}/scripts/pivpn
fi fi
$SUDO cp "${pivpnFilesDir}/scripts/${VPN}/bash-completion" /etc/bash_completion.d/pivpn $SUDO cp "${pivpnFilesDir}/scripts/${VPN}/bash-completion" /etc/bash_completion.d/pivpn