mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-22 04:40:16 +00:00
dynamic pivpn user home dir
This commit is contained in:
parent
6ce39bfec3
commit
0c44c83146
1 changed files with 3 additions and 2 deletions
|
@ -186,6 +186,7 @@ chooseUser() {
|
||||||
if [[ $? = 0 ]]; then
|
if [[ $? = 0 ]]; then
|
||||||
for desiredUser in ${chooseUserOptions}; do
|
for desiredUser in ${chooseUserOptions}; do
|
||||||
pivpnUser=${desiredUser}
|
pivpnUser=${desiredUser}
|
||||||
|
pivpnHome=$(eval echo ~${desiredUser})
|
||||||
echo "::: Using User: $pivpnUser"
|
echo "::: Using User: $pivpnUser"
|
||||||
echo "${pivpnUser}" > /tmp/pivpnUSR
|
echo "${pivpnUser}" > /tmp/pivpnUSR
|
||||||
done
|
done
|
||||||
|
@ -1003,8 +1004,8 @@ confOVPN() {
|
||||||
# verify server name to strengthen security
|
# verify server name to strengthen security
|
||||||
$SUDO sed -i "s/SRVRNAME/${SERVER_NAME}/" /etc/openvpn/easy-rsa/pki/Default.txt
|
$SUDO sed -i "s/SRVRNAME/${SERVER_NAME}/" /etc/openvpn/easy-rsa/pki/Default.txt
|
||||||
|
|
||||||
$SUDO mkdir "/home/$pivpnUser/ovpns"
|
$SUDO mkdir "$pivpnHome/ovpns"
|
||||||
$SUDO chmod 0777 -R "/home/$pivpnUser/ovpns"
|
$SUDO chmod 0777 -R "$pivpnHome/ovpns"
|
||||||
}
|
}
|
||||||
|
|
||||||
installPiVPN() {
|
installPiVPN() {
|
||||||
|
|
Loading…
Reference in a new issue