mirror of https://github.com/aredn/aredn.git
Tiny builds dont have wg installed (#1221)
This commit is contained in:
parent
2f1684a218
commit
8507fbc250
|
@ -113,7 +113,10 @@ end
|
||||||
info['tunnels']={}
|
info['tunnels']={}
|
||||||
-- ACTIVE TUNNELS
|
-- ACTIVE TUNNELS
|
||||||
local atc=os.capture("ifconfig|grep tun|wc -l"):chomp()
|
local atc=os.capture("ifconfig|grep tun|wc -l"):chomp()
|
||||||
local awc=os.capture("wg|grep interface|wc -l"):chomp()
|
local awc=0
|
||||||
|
if nixio.fs.stat("/usr/bin/wg") then
|
||||||
|
awc=os.capture("wg|grep interface|wc -l"):chomp()
|
||||||
|
end
|
||||||
info['tunnels']['active_tunnel_count']=tonumber(atc) + tonumber(awc)
|
info['tunnels']['active_tunnel_count']=tonumber(atc) + tonumber(awc)
|
||||||
|
|
||||||
-- Location info
|
-- Location info
|
||||||
|
|
Loading…
Reference in New Issue