Hello,
i want to pipe the output of the management command "status 2" into a file when a device is disconnected
i have
script-security 2
client-disconnect /etc/openvpn/scripts/disconnect.sh
in the
disconnect.sh i have
#!/bin/bash
result=$(( echo -n -e "status 2\n"; sleep 2; echo -n -e "quit\n" ) | telnet 172.16.0.1 2727)
echo $result > /tmp/vpn-status
if i start the script in the bash i get the Output in the file - if the script was called in the client-disconnect script.
the file have the following code inside
Trying 172.16.0.1... Connected to 172.16.0.1. Escape character is '^]'.
that's all - why ? Is this a bug ?
I try with openVPN 2.2.1 (Debian Stable) and the openVPN 2.3.6