mirror of
https://github.com/pivpn/pivpn.git
synced 2025-05-09 01:14:10 +02:00
remove refs to /etc/pivpn/setupVars in selfcheck and debug scripts
tidy indenting on install, check if symlink already exists before making one to avoid error uninstall indicates which vpns are available for uninstall selfcheck checks both protocols if both present install - additional text in reconfigure saying 2nd protocol can be added change to use pivpn ovpn instaed of pivpn opv when dual protocols exist
This commit is contained in:
parent
e3363a7d98
commit
b90077bd78
5 changed files with 86 additions and 37 deletions
|
@ -3,11 +3,11 @@
|
|||
# Must be root to use this tool
|
||||
if [ $EUID -ne 0 ];then
|
||||
if dpkg-query -s sudo &> /dev/null; then
|
||||
export SUDO="sudo"
|
||||
export SUDO="sudo"
|
||||
else
|
||||
echo "::: Please install sudo or run this as root."
|
||||
exit 1
|
||||
fi
|
||||
echo "::: Please install sudo or run this as root."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
scriptDir="/opt/pivpn"
|
||||
|
@ -17,7 +17,7 @@ showHelp(){
|
|||
echo "::: To pass off to the pivpn command for each protocol"
|
||||
echo ":::"
|
||||
echo "::: Usage: pivpn wg <command> [option]"
|
||||
echo "::: Usage: pivpn opv <command> [option]"
|
||||
echo "::: Usage: pivpn ovpn <command> [option]"
|
||||
echo ":::"
|
||||
echo "::: -h, help Show this help dialog"
|
||||
exit 0
|
||||
|
@ -30,7 +30,7 @@ fi
|
|||
# Handle redirecting to specific functions based on arguments
|
||||
case "$1" in
|
||||
wg ) "${scriptDir}/wireguard/pivpn.sh" "${@:2}";;
|
||||
opv ) "${scriptDir}/openvpn/pivpn.sh" "${@:2}";;
|
||||
ovpn ) "${scriptDir}/openvpn/pivpn.sh" "${@:2}";;
|
||||
"-h" | "help" ) showHelp;;
|
||||
* ) showHelp;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue