1
0
mirror of https://github.com/kenzok8/small-package synced 2025-11-18 01:01:34 +08:00

update-12.10

This commit is contained in:
github-actions[bot]
2021-12-10 20:31:35 +08:00
parent cd75f9c162
commit 8cbdbef469
6 changed files with 40 additions and 28 deletions

View File

@@ -4,9 +4,9 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[aliyundrive-webdav]], [[status]])
var tb = document.getElementById('aliyundrive-webdav_status');
if (data && tb) {
if (data.running) {
tb.innerHTML = '<em><b><font color=green>' + data.application + '<%:RUNNING%></font></b></em>';
tb.innerHTML = '<em><b style=color:green>' + data.application + '<%:RUNNING%></b></em>';
} else {
tb.innerHTML = '<em><b><font color=red>' + data.application + '<%:NOT RUNNING%></font></b></em>';
tb.innerHTML = '<em><b style=color:red>' + data.application + '<%:NOT RUNNING%></b></em>';
}
}
}

View File

@@ -4,9 +4,9 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[koolproxy]], [[status]])%>', null
var tb = document.getElementById('koolproxy_status');
if (data && tb) {
if (data.running) {
tb.innerHTML = '<em><b><font color=green><%:iKoolProxy 滤广告%>' + data.bin_version + '<%:运行中%></font></b></em>';
tb.innerHTML = '<em><b style=color:green><%:iKoolProxy 滤广告%>' + data.bin_version + '<%:运行中%></b></em>';
} else {
tb.innerHTML = '<em><b><font color=red><%:iKoolProxy 滤广告%>' + data.bin_version + '<%:未运行%></font></b></em>';
tb.innerHTML = '<em><b style=color:red><%:iKoolProxy 滤广告%>' + data.bin_version + '<%:未运行%></b></em>';
}
}
}

View File

@@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI based ipk store
LUCI_DESCRIPTION:=luci-app-store is a ipk store developed by LinkEase team
LUCI_DEPENDS:=+curl
LUCI_PKGARCH:=all
PKG_VERSION:=0.1.3
PKG_VERSION:=0.1.4
PKG_RELEASE:=1
PKG_MAINTAINER:=jjm2473 <jjm2473@gmail.com>

View File

@@ -57,28 +57,33 @@ local function is_exec(cmd)
local fs = require "nixio.fs"
local oflags = nixio.open_flags("wronly", "creat")
local lock, code, msg = nixio.open("/var/lock/istore.lock", oflags)
if not lock then
return 255, "", "Open lock failed: " .. msg
end
local lock, code, msg = nixio.open("/var/lock/istore.lock", oflags)
if not lock then
return 255, "", "Open lock failed: " .. msg
end
-- Acquire lock
local stat, code, msg = lock:lock("tlock")
if not stat then
local stat, code, msg = lock:lock("tlock")
if not stat then
lock:close()
return 255, "", "Lock failed: " .. msg
end
return 255, "", "Lock failed: " .. msg
end
local r = os.execute(cmd .. " >/tmp/log/istore.stdout 2>/tmp/log/istore.stderr")
local e = fs.readfile("/tmp/log/istore.stderr")
local o = fs.readfile("/tmp/log/istore.stdout")
local r = os.execute(cmd .. " >/var/log/istore.stdout 2>/var/log/istore.stderr")
local e = fs.readfile("/var/log/istore.stderr")
local o = fs.readfile("/var/log/istore.stdout")
fs.unlink("/var/log/istore.stderr")
fs.unlink("/var/log/istore.stdout")
fs.unlink("/tmp/log/istore.stderr")
fs.unlink("/tmp/log/istore.stdout")
lock:lock("ulock")
lock:close()
return r, o or "", e or ""
e = e or ""
if r == 256 and e == "" then
e = "os.execute failed, is /var/log full or not existed?"
end
return r, o or "", e or ""
end
function redirect_index()
@@ -96,8 +101,8 @@ end
function store_log()
local fs = require "nixio.fs"
local code = 0
local e = fs.readfile("/tmp/log/istore.stderr")
local o = fs.readfile("/tmp/log/istore.stdout")
local e = fs.readfile("/var/log/istore.stderr")
local o = fs.readfile("/var/log/istore.stdout")
if o ~= nil then
code = 206
end
@@ -143,12 +148,12 @@ local function _action(exe, cmd, ...)
local os = require "os"
local fs = require "nixio.fs"
local pkg = ""
for k, v in pairs({...}) do
pkg = pkg .. " '" .. v:gsub("'", "") .. "'"
end
local pkg = ""
for k, v in pairs({...}) do
pkg = pkg .. " '" .. v:gsub("'", "") .. "'"
end
local c = "%s %s %s" %{ exe, cmd, pkg }
local c = "%s %s %s" %{ exe, cmd, pkg }
return is_exec(c)
end

View File

@@ -4,7 +4,7 @@
(function(){
var vue_prefix="<%=prefix%>";
var myurl = window.location.pathname;
window.addEventListener('popstate', () => {
window.addEventListener('popstate', function(){
if (myurl != window.location.pathname
&& window.location.pathname != vue_prefix
&& ! window.location.pathname.startsWith(vue_prefix+'/')) {

View File

@@ -6,7 +6,7 @@ LISTS_DIR_O=/tmp/opkg-lists
LISTS_DIR=${IS_ROOT}${LISTS_DIR_O}
OPKG_CONF_DIR=${IS_ROOT}/etc/opkg
FEEDS_SERVER=https://istore.linkease.com/repo
ARCH=`opkg -f /dev/null print-architecture | grep -v 'arch all' | grep -v 'arch noarch' | cut -d ' ' -f2`
ARCH=`jsonfilter -i /etc/.app_store.id -e '$.arch'`
# for istore self upgrade
ISTORE_PKG=luci-app-store
@@ -36,6 +36,13 @@ opkg_wrap() {
}
update() {
if [ -z "${ARCH}" ]; then
echo "Get architecture failed" >&2
echo "/etc/.app_store.id:" >&2
cat /etc/.app_store.id >&2
return 1
fi
curl -o ${OPKG_CONF_DIR}/meta.conf "${FEEDS_SERVER}/all/meta.conf" && \
curl -o ${OPKG_CONF_DIR}/all.conf "${FEEDS_SERVER}/all/isfeeds.conf" && \
curl -o ${OPKG_CONF_DIR}/arch.conf "${FEEDS_SERVER}/${ARCH}/isfeeds.conf" && \