Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
cron -> * * * * * sudo -u root bash /root/connect.sh >/dev/null 2>&1
connect.sh file
ifconfig tun0 | grep error
if let "$?!=1"
then
echo "tun0 up" >> /root/openvpn.log
else
echo "tun0 down" >> /root/openvpn.log
bash /etc/openvpn/vpnconnect.sh
fi
exit 0
#!/bin/bash
openvpn --config /etc/openvpn/server.ovpn --auth-user-pass /etc/openvpn/auth.txt
exit 0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question