mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-06-15 06:05:31 +08:00
luci app vlmcsd: update to fit new luci
This commit is contained in:
parent
a776110414
commit
30d7a4cadf
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
LUCI_TITLE:=LuCI page for KMS
|
LUCI_TITLE:=LuCI page for KMS
|
||||||
LUCI_DEPENDS:=+vlmcsd
|
LUCI_DEPENDS:=+vlmcsd
|
||||||
PKG_VERSION:=1.0
|
PKG_VERSION:=1.0
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ end
|
|||||||
|
|
||||||
function act_status()
|
function act_status()
|
||||||
local e={}
|
local e={}
|
||||||
e.running=nixio.fs.access("/var/run/vlmcsd.pid")
|
e.running=luci.sys.call("pgrep vlmcsd >/dev/null")==0
|
||||||
luci.http.prepare_content("application/json")
|
luci.http.prepare_content("application/json")
|
||||||
luci.http.write_json(e)
|
luci.http.write_json(e)
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (c) 2011-2015 OpenWrt.org
|
# Copyright (c) 2011-2015 OpenWrt.org
|
||||||
|
|
||||||
PIDFILE=/var/run/vlmcsd.pid
|
|
||||||
START=90
|
START=90
|
||||||
|
|
||||||
get_config() {
|
get_config() {
|
||||||
@ -30,7 +29,7 @@ start() {
|
|||||||
config_load vlmcsd
|
config_load vlmcsd
|
||||||
config_foreach get_config vlmcsd
|
config_foreach get_config vlmcsd
|
||||||
[ $enabled -eq 0 ] && exit 0
|
[ $enabled -eq 0 ] && exit 0
|
||||||
/usr/bin/vlmcsd -i /etc/vlmcsd.ini -L 0.0.0.0:1688 -p $PIDFILE
|
/usr/bin/vlmcsd -i /etc/vlmcsd.ini -L 0.0.0.0:1688
|
||||||
echo "KMS Server has started."
|
echo "KMS Server has started."
|
||||||
|
|
||||||
if [ $autoactivate -eq 1 ]; then
|
if [ $autoactivate -eq 1 ]; then
|
||||||
@ -51,8 +50,7 @@ start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
pid=`cat $PIDFILE`
|
killall -q -9 vlmcsd
|
||||||
kill $pid || kill -9 $pid
|
echo "KMS Server has stopped."
|
||||||
echo "KMS Server has stopped."
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
delete ucitrack.@vlmcsd[-1]
|
delete ucitrack.@vlmcsd[-1]
|
||||||
add ucitrack vlmcsd
|
add ucitrack vlmcsd
|
||||||
set ucitrack.@vlmcsd[-1].init=vlmcsd
|
set ucitrack.@vlmcsd[-1].init=kms
|
||||||
commit ucitrack
|
commit ucitrack
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user