mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-21 12:20:16 +00:00
pivpn home dir
This commit is contained in:
parent
44107290eb
commit
21e3078de5
1 changed files with 4 additions and 3 deletions
|
@ -9,6 +9,7 @@ CA="ca.crt"
|
||||||
TA="ta.key"
|
TA="ta.key"
|
||||||
INDEX="/etc/openvpn/easy-rsa/pki/index.txt"
|
INDEX="/etc/openvpn/easy-rsa/pki/index.txt"
|
||||||
INSTALL_USER=$(cat /etc/pivpn/INSTALL_USER)
|
INSTALL_USER=$(cat /etc/pivpn/INSTALL_USER)
|
||||||
|
INSTALL_HOME=$(eval echo ~${INSTALL_USER})
|
||||||
|
|
||||||
# Functions def
|
# Functions def
|
||||||
|
|
||||||
|
@ -170,12 +171,12 @@ echo "tls-auth Private Key found: $TA"
|
||||||
} > "${NAME}${FILEEXT}"
|
} > "${NAME}${FILEEXT}"
|
||||||
|
|
||||||
# Copy the .ovpn profile to the home directory for convenient remote access
|
# Copy the .ovpn profile to the home directory for convenient remote access
|
||||||
cp "/etc/openvpn/easy-rsa/pki/$NAME$FILEEXT" "/home/$INSTALL_USER/ovpns/$NAME$FILEEXT"
|
cp "/etc/openvpn/easy-rsa/pki/$NAME$FILEEXT" "$INSTALL_HOME/ovpns/$NAME$FILEEXT"
|
||||||
chown "$INSTALL_USER" "/home/$INSTALL_USER/ovpns/$NAME$FILEEXT"
|
chown "$INSTALL_USER" "$INSTALL_HOME/ovpns/$NAME$FILEEXT"
|
||||||
printf "\n\n"
|
printf "\n\n"
|
||||||
printf "========================================================\n"
|
printf "========================================================\n"
|
||||||
printf "\e[1mDone! %s successfully created!\e[0m \n" "$NAME$FILEEXT"
|
printf "\e[1mDone! %s successfully created!\e[0m \n" "$NAME$FILEEXT"
|
||||||
printf "%s was copied to:\n" "$NAME$FILEEXT"
|
printf "%s was copied to:\n" "$NAME$FILEEXT"
|
||||||
printf " /home/%s/ovpns\n" "$INSTALL_USER"
|
printf " %s/ovpns\n" "$INSTALL_HOME"
|
||||||
printf "for easy transfer.\n"
|
printf "for easy transfer.\n"
|
||||||
printf "========================================================\n\n"
|
printf "========================================================\n\n"
|
||||||
|
|
Loading…
Reference in a new issue