Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 92369
Collapse All | Expand All

(-)/etc/init.d/openvpn (-5 / +18 lines)
Lines 59-70 Link Here
59
	if [ -f "$bn.sh" ]; then
59
	if [ -f "$bn.sh" ]; then
60
	    . $bn.sh
60
	    . $bn.sh
61
	fi
61
	fi
62
	rm -f $piddir/$bn.pid
62
63
	$openvpn --daemon openvpn-$bn --writepid $piddir/$bn.pid --config $c --cd $work
63
	if [ -f $bn.online ]; then
64
	if [ $? = 0 ]; then
64
	    fping -r 3 `cat $bn.online` &> /dev/null
65
	    successes=1
65
	else
66
	    false
67
	fi
68
69
	if [ $? -gt 0 ]; then
70
	    einfo "Starting connection $bn"
71
	    rm -f $piddir/$bn.pid
72
	    $openvpn --daemon openvpn-$bn --writepid $piddir/$bn.pid --config $c --cd $work
73
	    if [ $? = 0 ]; then
74
		successes=1
75
	    else
76
		errors=1
77
	    fi
66
	else
78
	else
67
	    errors=1
79
	    ewarn "Connection $bn is already online"
80
	    successes=1
68
	fi
81
	fi
69
    done
82
    done
70
83

Return to bug 92369