mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-26 09:10:10 +00:00
fixed conflicts between pr #871 and local works
This commit is contained in:
commit
b1dbe27b2d
4 changed files with 11 additions and 7 deletions
|
@ -8,8 +8,9 @@ KEY=".key"
|
|||
CA="ca.crt"
|
||||
TA="ta.key"
|
||||
INDEX="/etc/openvpn/easy-rsa/pki/index.txt"
|
||||
INSTALL_USER=$(cat /etc/pivpn/INSTALL_USER)
|
||||
INSTALL_HOME=$(cat /etc/passwd | grep "$INSTALL_USER" | cut -d: -f6)
|
||||
INSTALL_USER=$(</etc/pivpn/INSTALL_USER)
|
||||
INSTALL_HOME=$(grep -m1 "^${INSTALL_USER}:" /etc/passwd | cut -d: -f6)
|
||||
INSTALL_HOME=${INSTALL_HOME%/} # remove possible trailing slash
|
||||
|
||||
helpFunc() {
|
||||
echo "::: Create a client ovpn profile, optional nopass"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
# PiVPN: revoke client script
|
||||
|
||||
INSTALL_USER=$(cat /etc/pivpn/INSTALL_USER)
|
||||
PLAT=$(cat /etc/pivpn/DET_PLATFORM)
|
||||
INSTALL_USER=$(</etc/pivpn/INSTALL_USER)
|
||||
PLAT=$(</etc/pivpn/DET_PLATFORM)
|
||||
INDEX="/etc/openvpn/easy-rsa/pki/index.txt"
|
||||
|
||||
helpFunc() {
|
||||
|
@ -104,7 +104,8 @@ fi
|
|||
|
||||
cd /etc/openvpn/easy-rsa || exit
|
||||
|
||||
INSTALL_HOME=$(cat /etc/passwd | grep "$INSTALL_USER" | cut -d: -f6)
|
||||
INSTALL_HOME=$(grep -m1 "^${INSTALL_USER}:" /etc/passwd | cut -d: -f6)
|
||||
INSTALL_HOME=${INSTALL_HOME%/} # remove possible trailing slash
|
||||
for (( ii = 0; ii < ${#CERTS_TO_REVOKE[@]}; ii++)); do
|
||||
printf "\n::: Revoking certificate '"%s"'.\n" "${CERTS_TO_REVOKE[ii]}"
|
||||
./easyrsa --batch revoke "${CERTS_TO_REVOKE[ii]}"
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
# PiVPN: Uninstall Script
|
||||
|
||||
INSTALL_USER=$(cat /etc/pivpn/INSTALL_USER)
|
||||
INSTALL_HOME=$(cat /etc/passwd | grep "$INSTALL_USER" | cut -d: -f6)
|
||||
INSTALL_HOME=$(grep -m1 "^${INSTALL_USER}:" /etc/passwd | cut -d: -f6)
|
||||
INSTALL_HOME=${INSTALL_HOME%/} # remove possible trailing slash
|
||||
PLAT=$(cat /etc/pivpn/DET_PLATFORM)
|
||||
NO_UFW=$(cat /etc/pivpn/NO_UFW)
|
||||
OLD_UFW=$(cat /etc/pivpn/NO_UFW)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue