mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 10:50:16 +00:00
Merge pull request #1321 from DerDanilo/add_wireguard_persistentkeepalive
Add wireguard persistentkeepalive
This commit is contained in:
commit
c002031ce3
3 changed files with 12 additions and 0 deletions
|
@ -1129,6 +1129,13 @@ installPiVPN(){
|
|||
echo "pivpnPROTO=${pivpnPROTO}" >> ${tempsetupVarsFile}
|
||||
echo "pivpnMTU=${pivpnMTU}" >> ${tempsetupVarsFile}
|
||||
|
||||
# Write PERSISTENTKEEPALIVE if provided via unattended file
|
||||
# May also be added manually to /etc/pivpn/wireguard/setupVars.conf
|
||||
# post installation to be used for client profile generation
|
||||
if [ "$pivpnPERSISTENTKEEPALIVE" ]; then
|
||||
echo "pivpnPERSISTENTKEEPALIVE=${pivpnPERSISTENTKEEPALIVE}" >> ${tempsetupVarsFile}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
{
|
||||
|
|
|
@ -9,4 +9,5 @@ pivpnPORT=51820
|
|||
pivpnDNS1=9.9.9.9
|
||||
pivpnDNS2=149.112.112.112
|
||||
pivpnHOST=pivpn.example.com
|
||||
pivpnPERSISTENTKEEPALIVE=25
|
||||
UNATTUPG=1
|
||||
|
|
|
@ -120,6 +120,10 @@ PublicKey = $(cat keys/server_pub)
|
|||
PresharedKey = $(cat "keys/${CLIENT_NAME}_psk")
|
||||
Endpoint = ${pivpnHOST}:${pivpnPORT}
|
||||
AllowedIPs = ${ALLOWED_IPS}" >> "configs/${CLIENT_NAME}.conf"
|
||||
|
||||
if [ -n "${pivpnPERSISTENTKEEPALIVE}" ]; then
|
||||
echo "PersistentKeepalive = ${pivpnPERSISTENTKEEPALIVE}" >> "configs/${CLIENT_NAME}.conf"
|
||||
fi
|
||||
echo "::: Client config generated"
|
||||
|
||||
echo "### begin ${CLIENT_NAME} ###
|
||||
|
|
Loading…
Reference in a new issue