connect-script double call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Nikos. I found scripts will break VPN now in the git, after
connected to VPN, can't ping anything, if remove the scripts from
config, works fine.

The script as simple as:

#!/bin/bash

if [ "$REASON" = "connect" ];then
        echo "User '$USERNAME' from '$IP_REAL' connected. Local IP is
'$IP_REMOTE'" >> /tmp/bar
        echo "User '$USERNAME' from '$IP_REAL' disconnected." >> /tmp/bar
        tx=$(cat /sys/class/net/$DEVICE/statistics/tx_bytes)
        rx=$(cat /sys/class/net/$DEVICE/statistics/rx_bytes)
        echo $tx $rx >> /tmp/bar
fi

exit 0



On Mon, Apr 14, 2014 at 5:40 PM, Nikos Mavrogiannopoulos
<nmav at gnutls.org> wrote:
> On Sun, Apr 13, 2014 at 10:32 PM, Steve <steve at thupdi.net> wrote:
>> Update: be3920a08cdc561f01f9ac5f995441e7408bea18
>>
>> The VPN devices keeping in system, vpn1 vpn2 vpn3 ..
>> Disconnect doesn't kill device.
>
> Hello,
>  That's the idea. The device will stay until the next ocserv
> maintenance cycle. That would be, a cleanup, every two minutes or so.
>
> regards,
> Nikos



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux