Skip to content

Commit

Permalink
fixes #27
Browse files Browse the repository at this point in the history
  • Loading branch information
aa65535 committed Apr 10, 2016
1 parent e2fb3a1 commit 0aacabf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions files/luci/model/cbi/shadowsocks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ end

function get_version()
local version = "1.0.0-1"
ipkg.list_installed("shadowsocks-libev-spec", function(n, v, d)
ipkg.list_installed("shadowsocks-libev-spec*", function(n, v, d)
pkg_name = n
version = v
end)
Expand All @@ -43,8 +43,11 @@ function compare_versions(ver1, comp, ver2)
end

if compare_versions(min_version, ">>", get_version()) then
return Map(shadowsocks, translate("ShadowSocks"),
'<b style="color:red">Please update the packages: %s</b>' %{pkg_name})
local tip = 'shadowsocks-libev-spec not found'
if pkg_name then
tip = 'Please update the packages: %s' %{pkg_name}
end
return Map(shadowsocks, translate("ShadowSocks"), '<b style="color:red">%s</b>' %{tip})
end

local chnroute = uci:get_first("chinadns", "chinadns", "chnroute")
Expand Down

0 comments on commit 0aacabf

Please sign in to comment.