mirror of https://github.com/aredn/aredn.git
fix client options and disconnect graphic
This commit is contained in:
parent
7327c2de51
commit
5d6ba0c244
|
@ -112,6 +112,16 @@ start() {
|
|||
apply_uci_config
|
||||
config_load vtun
|
||||
|
||||
#if options section doesn't exist, add it
|
||||
echo "testing for options..."
|
||||
j=`uci get vtun.@options[0]`
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
j=`uci add vtun options`
|
||||
j='uci commit vtun'
|
||||
config_load vtun
|
||||
fi
|
||||
|
||||
# Remove the current vtun config file
|
||||
rm -f $CLIENT_CONF
|
||||
|
||||
|
|
|
@ -442,7 +442,6 @@ sub save_clients()
|
|||
$rc=&uci_set_indexed_option("vtun","client",$i,"serverip",$serverip);
|
||||
push(@cli_err,"Problem saving UCI vtun client server IP (#$i)") if $rc;
|
||||
|
||||
|
||||
|
||||
$rc=&uci_set_indexed_option("vtun","client",$i,"node",$vtun_node_name);
|
||||
push(@cli_err,"Problem saving UCI vtun client name (#$i)") if $rc;
|
||||
|
|
|
@ -335,8 +335,11 @@ sub print_vpn_connections()
|
|||
|
||||
print "</td>";
|
||||
print "<td> ";
|
||||
print "<img class='tun_client_active_img' src='/plug-connect.png'/>" if (&is_tunnel_active($netip,@active_tun) && ($val ne "_add"));
|
||||
print "<img class='tun_client_inactive_img' src='/plug-disconnect.png'/>" if ($val ne "_add");
|
||||
if (&is_tunnel_active($netip,@active_tun) && ($val ne "_add")) {
|
||||
print "<img class='tun_client_active_img' src='/plug-connect.png'/>";
|
||||
} else {
|
||||
print "<img class='tun_client_inactive_img' src='/plug-disconnect.png'/>" if ($val ne "_add");
|
||||
}
|
||||
print "</td>";
|
||||
print "<td> ";
|
||||
|
||||
|
|
Loading…
Reference in New Issue