mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-25 16:50:12 +00: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
|
@ -48,15 +48,13 @@ removeClient(){
|
|||
}
|
||||
|
||||
uninstallServer(){
|
||||
$SUDO ${scriptdir}/uninstall.sh
|
||||
$SUDO ${scriptdir}/uninstall.sh "${vpn}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
updateScripts(){
|
||||
shift
|
||||
# $SUDO ${scriptdir}/update.sh "$@"
|
||||
echo "::: The updating functionality for PiVPN scripts is temporarily disabled"
|
||||
echo "::: To keep the VPN (and the system) up to date, use 'apt update' and 'apt upgrade'"
|
||||
$SUDO ${scriptdir}/update.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -98,7 +96,6 @@ case "$1" in
|
|||
"-h" | "help" ) showHelp;;
|
||||
"-u" | "uninstall" ) uninstallServer;;
|
||||
"-up" | "update" ) updateScripts "$@" ;;
|
||||
"-wg" | "wgupdate" ) updateWireGuard ;;
|
||||
"-bk" | "backup" ) backup ;;
|
||||
* ) showHelp;;
|
||||
esac
|
||||
|
|
|
@ -13,7 +13,7 @@ source "${setupVars}"
|
|||
echo -e "::::\t\t\e[4mPiVPN debug\e[0m\t\t ::::"
|
||||
printf "=============================================\n"
|
||||
echo -e "::::\t\t\e[4mLatest commit\e[0m\t\t ::::"
|
||||
git --git-dir /etc/.pivpn/.git log -n 1
|
||||
git --git-dir /usr/local/src/pivpn/.git log -n 1
|
||||
printf "=============================================\n"
|
||||
echo -e "::::\t \e[4mInstallation settings\e[0m \t ::::"
|
||||
sed "s/$pivpnHOST/REDACTED/" < ${setupVars}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue