From 44107290ebc2484ee8f76fc07028b72a650c64d8 Mon Sep 17 00:00:00 2001 From: orttez Date: Fri, 16 Jun 2017 16:31:49 -0400 Subject: [PATCH] dynamic pivpn home dir --- scripts/removeOVPN.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/removeOVPN.sh b/scripts/removeOVPN.sh index 8f5773d..d3905bc 100644 --- a/scripts/removeOVPN.sh +++ b/scripts/removeOVPN.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # PiVPN: revoke client script -INSTALL_USER=$(cat /etc/pivpn/INSTALL_USER) +INSTALL_HOME=$(eval echo ~$(cat /etc/pivpn/INSTALL_USER)) REVOKE_STATUS=$(cat /etc/pivpn/REVOKE_STATUS) PLAT=$(cat /etc/pivpn/DET_PLATFORM) INDEX="/etc/openvpn/easy-rsa/pki/index.txt" @@ -73,6 +73,6 @@ printf "::: Removing certs and client configuration for this profile.\n" rm -rf "pki/reqs/${NAME}.req" rm -rf "pki/private/${NAME}.key" rm -rf "pki/issued/${NAME}.crt" -rm -rf "/home/${INSTALL_USER}/ovpns/${NAME}.ovpn" +rm -rf "${INSTALL_HOME}/ovpns/${NAME}.ovpn" cp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem printf "::: Completed!\n"