Tiny builds dont have wg installed (#1221)

This commit is contained in:
Tim Wilkinson 2024-05-26 16:42:48 -07:00 committed by GitHub
parent 2f1684a218
commit 8507fbc250
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,10 @@ end
info['tunnels']={}
-- ACTIVE TUNNELS
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)
-- Location info