I have an OpenVPN server which triggers a bash script when a connection is established. This script uses wget
to post information to another server.
Today I noticed that when this other server is not reachable, wget
fails, which makes the bash script return a failure, and the connection from the client aborts due to an "authentication problem". The problem was that the logging server could not get reached, but this should not be a reason for the connection to get aborted.
What can I do so that the entire script, which is triggered by a client-connect /home/user/openvpn/scripts/client-connected.sh
entry in the ovpn config file, always succeeds?