#!/usr/bin/lua
-- (c)NeoRouter Inc.

-- add plugin
local pkg = require "luci.fon.pkg"
local plugin = pkg.Plugin("nrserver")
local ret = plugin:add("NeoRouter", "NeoRouter Inc.", "1.0.0.1800")
local sys = require("luci.sys")
local dir = sys.getenv("PWD")

if ret == false then
	print("plugin already installed")
	return 0
end

plugin:dashboard("icons/NR_inabox.png", 2000, "nrserver")
-- plugin:redirect()
plugin:add_uninstall("/etc/uninstall/nrserver_uninst")
plugin:addfiles(dir.."/files/")
plugin:finalize()

sys.call("/tmp/postinst")

