Commit 51985bda authored by Dave Loper's avatar Dave Loper

add back in Nick's changes for comp-lzo

parent 394c2244
Pipeline #61324281 canceled with stages
......@@ -78,9 +78,32 @@ CHECK=`grep "^ifconfig-pool-persist /var/lib/openvpn/ipp.txt" /etc/openvpn/clien
if [ -n "$CHECK" ]; then
logger -p local6.notice -t installer "app-openvpn-core - updating ifconfig-pool-persist filename for TCP"
sed -i -e 's/^ifconfig-pool-persist \/var\/lib\/openvpn\/ipp.txt/ifconfig-pool-persist \/var\/lib\/openvpn\/ipp-tcp.txt/' /etc/openvpn/clients-tcp.conf
/sbin/service openvpn restart >/dev/null 2>&1
systemctl condrestart openvpn@clients-tcp >/dev/null 2>&1
fi
# Check for comp-lzo in configs and replace
#------------------------------------------
for CONFIG in $CONFIGS; do
CHECK=`grep "^comp-lzo$" $CONFIG`
if [ -n "$CHECK" ]; then
logger -p local6.notice -t installer "app-openvpn-core - removing comp-lzo in $CONFIG"
sed -i '/comp-lzo/d' $CONFIG
CHECKSTUB=`grep 'compress stub-v2' $CONFIG`
if [ -z "$CHECKSTUB" ]; then
echo 'compress stub-v2' >> $CONFIG
fi
CHECKPUSHSTUB=`grep 'push "compress stub-v2"' $CONFIG`
if [ -z "$CHECKPUSHSTUB" ]; then
echo 'push "compress stub-v2"' >> $CONFIG
fi
systemctl condrestart openvpn@$(basename $CONFIG .conf) >/dev/null 2>&1
fi
done
# Sync action: updates configuration using clearsync hook
#--------------------------------------------------------
......
......@@ -12,7 +12,8 @@ key /etc/pki/CA/private/sys-0-key.pem
dh /etc/openvpn/ssl/dh1024.pem
server 10.8.10.0 255.255.255.0
keepalive 10 120
comp-lzo
compress stub-v2
push "compress stub-v2"
user nobody
group nobody
persist-key
......
......@@ -12,7 +12,8 @@ key /etc/pki/CA/private/sys-0-key.pem
dh /etc/openvpn/ssl/dh1024.pem
server 10.8.0.0 255.255.255.0
keepalive 10 120
comp-lzo
compress stub-v2
push "compress stub-v2"
user nobody
group nobody
multihome
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment