From 052376a133ce27052206c9e31c86d6512923f1b3 Mon Sep 17 00:00:00 2001 From: shelleycat485 <63857845+shelleycat485@users.noreply.github.com> Date: Wed, 6 May 2020 22:03:38 +0100 Subject: [PATCH] install.sh path correct --- auto_install/install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index f34230c..d133e6c 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -2244,16 +2244,17 @@ installScripts(){ fi $SUDO install -v -m 755 -t ${pivpnScriptDir} ${pivpnFilesDir}/scripts/*.sh $SUDO install -v -m 755 -t ${pivpnScriptDir}/${VPN} ${pivpnFilesDir}/scripts/${VPN}/*.sh - # line for the single command being installed - $SUDO ln -s -T ${pivpnFilesDir}/scripts/${VPN}/pivpn pivpn - # if the other protocol file exists - if [ ${VPN} -eq 'wireguard' ]; then + # make a link for a single command being installed + $SUDO ln -s -T ${pivpnScriptDir}/${VPN}/pivpn.sh /usr/local/bin/pivpn + # if the other protocol file exists it has been installed + if [[ ${VPN} == 'wireguard' ]]; then othervpn='openvpn' else othervpn='wireguard' 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 + $SUDO rm -f /usr/local/bin/pivpn $SUDO install -v -m 755 -t /usr/local/bin /${pivpnFilesDir}/scripts/pivpn fi $SUDO cp "${pivpnFilesDir}/scripts/${VPN}/bash-completion" /etc/bash_completion.d/pivpn