diff --git a/package/lean/luci-app-ps3netsrv/Makefile b/package/lean/luci-app-ps3netsrv/Makefile new file mode 100644 index 0000000000..89c3dc0fd1 --- /dev/null +++ b/package/lean/luci-app-ps3netsrv/Makefile @@ -0,0 +1,18 @@ +# +# Copyright (C) 2008-2014 The LuCI Team +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=Luci for PS3NETSRV +LUCI_DEPENDS:=+ps3netsrv +LUCI_PKGARCH:=all +PKG_VERSION:=1 +PKG_RELEASE:=2 + +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature + diff --git a/package/lean/luci-app-ps3netsrv/luasrc/controller/ps3netsrv.lua b/package/lean/luci-app-ps3netsrv/luasrc/controller/ps3netsrv.lua new file mode 100644 index 0000000000..66dc6307a8 --- /dev/null +++ b/package/lean/luci-app-ps3netsrv/luasrc/controller/ps3netsrv.lua @@ -0,0 +1,21 @@ +module("luci.controller.ps3netsrv",package.seeall) + +function index() +if not nixio.fs.access("/etc/config/ps3netsrv")then + return +end + +entry({"admin", "nas"}, firstchild(), "NAS", 44).dependent = false + +local page + +entry({"admin", "nas","ps3netsrv"},cbi("ps3netsrv"),_("PS3 NET Server"),40).dependent=true +entry({"admin", "nas","ps3netsrv","status"},call("act_status")).leaf=true +end + +function act_status() + local e={} + e.running=luci.sys.call("ps | grep ps3netsrv |grep -v grep >/dev/null") == 0 + luci.http.prepare_content("application/json") + luci.http.write_json(e) +end diff --git a/package/lean/luci-app-ps3netsrv/luasrc/model/cbi/ps3netsrv.lua b/package/lean/luci-app-ps3netsrv/luasrc/model/cbi/ps3netsrv.lua new file mode 100644 index 0000000000..94db16034a --- /dev/null +++ b/package/lean/luci-app-ps3netsrv/luasrc/model/cbi/ps3netsrv.lua @@ -0,0 +1,24 @@ +-- Copyright 2020 Lean +-- Licensed to the public under the Apache License 2.0. + +m = Map("ps3netsrv", translate("PS3 NET Server"), translate("PS3NETSRV is ISO/PKG server for Sony PlayStation 3 webMAN-MOD plugin")) + +m:section(SimpleSection).template = "ps3netsrv/ps3netsrv_status" + +s = m:section(TypedSection, "ps3netsrv") +s.addremove = false +s.anonymous = true + +enable=s:option(Flag, "enabled", translate("Enabled")) +enable.default = "0" +enable.rmempty = false + +db_path=s:option(Value, "dir", translate("Dir Path")) +db_path.default = "/root" +db_path.rmempty = false + +port=s:option(Value, "port", translate("Port")) +port.rmempty = false +port.datatype = "port" + +return m \ No newline at end of file diff --git a/package/lean/luci-app-ps3netsrv/luasrc/view/ps3netsrv/ps3netsrv_status.htm b/package/lean/luci-app-ps3netsrv/luasrc/view/ps3netsrv/ps3netsrv_status.htm new file mode 100644 index 0000000000..ebd057020f --- /dev/null +++ b/package/lean/luci-app-ps3netsrv/luasrc/view/ps3netsrv/ps3netsrv_status.htm @@ -0,0 +1,22 @@ + + +
+

+ <%:Collecting data...%> +

+
\ No newline at end of file diff --git a/package/lean/luci-app-ps3netsrv/po/zh_Hans/ps3netsrv.po b/package/lean/luci-app-ps3netsrv/po/zh_Hans/ps3netsrv.po new file mode 100644 index 0000000000..81c9734887 --- /dev/null +++ b/package/lean/luci-app-ps3netsrv/po/zh_Hans/ps3netsrv.po @@ -0,0 +1,26 @@ +msgid "" +msgstr "" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-23 20:16+0800\n" +"PO-Revision-Date: 2015-06-23 20:17+0800\n" +"Last-Translator: coolsnowwolf \n" +"Language-Team: PandoraBox Team\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 1.8.1\n" +"X-Poedit-SourceCharset: UTF-8\n" + +msgid "PS3 NET Server" +msgstr "PS3 NET 服务器" + +msgid "PS3NETSRV is ISO/PKG server for Sony PlayStation 3 webMAN-MOD plugin" +msgstr "PS3NETSRV 是一个 Sony PlayStation 3 自制系统 webMAN-MOD 插件的服务器端(用于加载蓝光/游戏ISO/PKG)" + +msgid "Dir Path" +msgstr "目录路径" + +msgid "Port" +msgstr "端口" diff --git a/package/lean/luci-app-ps3netsrv/root/etc/uci-defaults/ps3netsrv b/package/lean/luci-app-ps3netsrv/root/etc/uci-defaults/ps3netsrv new file mode 100755 index 0000000000..40b8f9fa05 --- /dev/null +++ b/package/lean/luci-app-ps3netsrv/root/etc/uci-defaults/ps3netsrv @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@ps3netsrv[-1] + add ucitrack ps3netsrv + set ucitrack.@ps3netsrv[-1].init=ps3netsrv + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0