mirror of
https://github.com/pivpn/pivpn.git
synced 2025-05-09 01:14:10 +02:00
Improved dual VPN uninstallation, remove duplicate code/script
- Allow using 'pivpn vpn -u' to directly uninstall VPN 'vpn' - Also allow using 'pivpn -u' with two VPNs (will present a dialog). - During uninstall, ask which VPN to remove only if there are two VPNs - PiVPN git repo will be downloaded to '/usr/local/src/pivpn'. All scripts in /opt/pivpn, the main pivpn script and the bash completion file, are now just symbolic links. Resolves issue #695. - Remove unused call to updateWireGuard().
This commit is contained in:
parent
1dc10e7d54
commit
823afa3fbb
8 changed files with 121 additions and 137 deletions
|
@ -11,7 +11,11 @@ if [ $EUID -ne 0 ];then
|
|||
fi
|
||||
|
||||
scriptDir="/opt/pivpn"
|
||||
vpn="wireguard"
|
||||
|
||||
uninstallServer(){
|
||||
$SUDO ${scriptDir}/uninstall.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
showHelp(){
|
||||
echo "::: To pass off to the pivpn command for each protocol"
|
||||
|
@ -20,6 +24,7 @@ showHelp(){
|
|||
echo "::: Usage: pivpn ovpn <command> [option]"
|
||||
echo ":::"
|
||||
echo "::: -h, help Show this help dialog"
|
||||
echo "::: -u, uninstall Uninstall pivpn from your system!"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -32,5 +37,6 @@ case "$1" in
|
|||
wg ) "${scriptDir}/wireguard/pivpn.sh" "${@:2}";;
|
||||
ovpn ) "${scriptDir}/openvpn/pivpn.sh" "${@:2}";;
|
||||
"-h" | "help" ) showHelp;;
|
||||
"-u" | "uninstall" ) uninstallServer;;
|
||||
* ) showHelp;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue