mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-18 17:33:31 +00:00
luci-app-kodexplorer: fix path error
This commit is contained in:
parent
1e43884bca
commit
7fc6f53db1
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018 Lienol
|
||||
# Copyright (C) 2018-2019 Lienol
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for KodExplorer
|
||||
LUCI_DEPENDS:=+nginx +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=2-20181208
|
||||
PKG_RELEASE:=5-20190518
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -21,11 +21,9 @@ local function http_write_json(content)
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local nginx="nginx"
|
||||
local php_fpm="php-fpm"
|
||||
local e={}
|
||||
e.nginx_status=luci.sys.call("ps | grep -v grep | grep '"..nginx.."' >/dev/null")==0
|
||||
e.php_status=luci.sys.call("ps | grep -v grep | grep '"..php_fpm.."' >/dev/null")==0
|
||||
e.nginx_status=luci.sys.call("ps -w | grep nginx | grep kodexplorer | grep -v grep > /dev/null") == 0
|
||||
e.php_status=luci.sys.call("ps -w | grep php | grep kodexplorer | grep -v grep > /dev/null") == 0
|
||||
http_write_json(e)
|
||||
end
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
-- Copyright 2018 Lienol <lienol@qq.com>
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local sys = require "luci.sys"
|
||||
local uci = require "luci.model.uci".cursor()
|
||||
@ -115,8 +112,8 @@ local function get_api_json(url)
|
||||
return jsonc.parse(json_content) or { }
|
||||
end
|
||||
|
||||
function get_config_option(option, default)
|
||||
return uci:get("kcptun", "general", option) or default
|
||||
function get_project_directory()
|
||||
return uci:get("kodexplorer", "global", "project_directory") or luci.sys.exec("echo -n `uci get kodexplorer.@global[0].project_directory`")
|
||||
end
|
||||
|
||||
function to_check()
|
||||
@ -211,7 +208,7 @@ function to_move(file)
|
||||
}
|
||||
end
|
||||
|
||||
local client_file = get_config_option("storage_directory", "/mnt/sda1/kodexplorer")
|
||||
local client_file = get_project_directory()
|
||||
sys.call("mkdir -p "..client_file)
|
||||
sys.call("cp -R "..file.."/KodExplorer*/* "..client_file)
|
||||
sys.call("/bin/rm -rf /tmp/kodexplorer_extract.*")
|
||||
|
@ -1,5 +1,5 @@
|
||||
<%#
|
||||
Copyright 2018 <lienol@qq.com>
|
||||
Copyright (C) 2018-2019 Lienol
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
<%#
|
||||
Copyright 2018 Lienol
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local dsp = require "luci.dispatcher"
|
||||
-%>
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
config global
|
||||
option port '81'
|
||||
option port '8081'
|
||||
option memory_limit '8M'
|
||||
option post_max_size '12M'
|
||||
option upload_max_filesize '12M'
|
||||
|
2
package/lean/luci-app-kodexplorer/root/etc/init.d/kodexplorer
Normal file → Executable file
2
package/lean/luci-app-kodexplorer/root/etc/init.d/kodexplorer
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2018 Lienol <admin@lienol.cn>
|
||||
# Copyright (C) 2018-2019 Lienol
|
||||
|
||||
START=99
|
||||
|
||||
|
0
package/lean/luci-app-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer
Normal file → Executable file
0
package/lean/luci-app-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer
Normal file → Executable file
Loading…
Reference in New Issue
Block a user