mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
fix for non sudo user install
This commit is contained in:
parent
0b50af3ea2
commit
04eb49116f
1 changed files with 3 additions and 2 deletions
|
@ -498,14 +498,15 @@ confOpenVPN () {
|
|||
|
||||
# Write config file for server using the template .txt file
|
||||
LOCALIP=$(ifconfig $pivpnInterface | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*')
|
||||
$SUDO sed 's/LOCALIP/'$LOCALIP'/' </etc/.pivpn/server_config.txt >/etc/openvpn/server.conf
|
||||
$SUDO cp /etc/.pivpn/server_config.txt /etc/openvpn/server.conf
|
||||
$SUDO sed -i "s/LOCALIP/${LOCALIP}/g" /etc/openvpn/server.conf
|
||||
if [ $ENCRYPT = 2048 ]; then
|
||||
$SUDO sed -i 's:dh1024:dh2048:' /etc/openvpn/server.conf
|
||||
fi
|
||||
|
||||
# if they modified port put value in server.conf
|
||||
if [ $PORT != 1194 ]; then
|
||||
$SUDO sed -i -e "s/1194/${PORT}/g" /etc/openvpn/server.conf
|
||||
$SUDO sed -i "s/1194/${PORT}/g" /etc/openvpn/server.conf
|
||||
fi
|
||||
|
||||
# write out server certs to conf file
|
||||
|
|
Loading…
Reference in a new issue