From dcd497c0d49302f66a77383c18678e062eda5f4a Mon Sep 17 00:00:00 2001 From: orttez Date: Fri, 16 Jun 2017 16:38:37 -0400 Subject: [PATCH] dynamic uninstall pivpn home dir --- scripts/uninstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index 4c3f4e3..ccc66a8 100644 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -16,7 +16,7 @@ else fi fi -INSTALL_USER=$(cat /etc/pivpn/INSTALL_USER) +INSTALL_HOME=$(eval echo ~$(cat /etc/pivpn/INSTALL_USER)) PLAT=$(cat /etc/pivpn/DET_PLATFORM) NO_UFW=$(cat /etc/pivpn/NO_UFW) PORT=$(cat /etc/pivpn/INSTALL_PORT) @@ -82,7 +82,7 @@ echo ":::" echo "::: Removing pivpn system files..." $SUDO rm -rf /opt/pivpn &> /dev/null $SUDO rm -rf /etc/.pivpn &> /dev/null - $SUDO rm -rf /home/$INSTALL_USER/ovpns &> /dev/null + $SUDO rm -rf $INSTALL_HOME/ovpns &> /dev/null $SUDO rm -rf /var/log/*pivpn* &> /dev/null $SUDO rm -rf /var/log/*openvpn* &> /dev/null