luci-app-serverchan: bump to v1.41
This commit is contained in:
parent
12cbd6ccba
commit
29d37f0bf1
@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-serverchan
|
||||
PKG_VERSION:=1.39
|
||||
PKG_VERSION:=1.41
|
||||
PKG_RELEASE:=5
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -28,11 +28,10 @@ define Package/$(PKG_NAME)/conffiles
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/usr/bin/serverchan $(1)/etc/config $(1)/usr/lib/lua/luci
|
||||
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/bin/serverchan $(1)/etc/config $(1)/usr/lib/lua/luci
|
||||
$(CP) ./luasrc/* $(1)/usr/lib/lua/luci
|
||||
$(INSTALL_CONF) ./root/etc/config/serverchan $(1)/etc/config
|
||||
$(INSTALL_BIN) ./root/etc/init.d/serverchan $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./root/etc/uci-defaults/luci-serverchan $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./root/usr/bin/serverchan/serverchan $(1)/usr/bin/serverchan
|
||||
endef
|
||||
|
||||
|
||||
@ -65,6 +65,8 @@ e.write=function(e,e,e)
|
||||
end
|
||||
|
||||
e=s:taboption("log", Button,translate(""))
|
||||
e:depends({debuglevel="1"})
|
||||
e:depends({debuglevel="2"})
|
||||
e.inputtitle=translate("清理日志")
|
||||
e.inputstyle = "clean_log"
|
||||
function e.write(self, section)
|
||||
@ -133,15 +135,15 @@ a=s:taboption("tab_basic2", Flag,"cpuload_enable",translate("CPU 负载报警"))
|
||||
a.default=0
|
||||
a.rmempty=true
|
||||
a= s:taboption("tab_basic2", Value, "cpuload", "负载报警阈值")
|
||||
a.default = "3.0"
|
||||
a.rmempty = true
|
||||
a.placeholder = "2.0"
|
||||
a:depends({cpuload_enable="1"})
|
||||
a=s:taboption("tab_basic2", Flag,"temperature_enable",translate("CPU 温度报警"))
|
||||
a.default=0
|
||||
a.rmempty=true
|
||||
a= s:taboption("tab_basic2", Value, "temperature", "温度报警阈值")
|
||||
a.rmempty = true
|
||||
a.placeholder = "80"
|
||||
a.default = "80"
|
||||
a:depends({temperature_enable="1"})
|
||||
a.description = translate("<br/>设备报警只会在连续五分钟超过设定值时才会推送<br/>而且一个小时内不会再提醒第二次")
|
||||
|
||||
|
||||
@ -1,19 +1,14 @@
|
||||
|
||||
config serverchan 'serverchan'
|
||||
option serverchan_ip '1'
|
||||
option serverchan_down '1'
|
||||
option serverchan_sleeptime '60'
|
||||
option sheep_enabled '1'
|
||||
option temp_mask '1'
|
||||
option cpuload_enable '1'
|
||||
option temperature_enable '1'
|
||||
option serverchan_ipv6 '0'
|
||||
option serverchan_sheep '0'
|
||||
option cpuload '2'
|
||||
option send_enable '0'
|
||||
option serverchan_enable '0'
|
||||
option sleeptime '60'
|
||||
option serverchan_ipv4 '0'
|
||||
option serverchan_up '1'
|
||||
option serverchan_ipv6 '0'
|
||||
option serverchan_up '0'
|
||||
option serverchan_down '0'
|
||||
option cpuload_enable '0'
|
||||
option temperature_enable '0'
|
||||
option up_timeout '2'
|
||||
option down_timeout '10'
|
||||
option serverchan_sheep '0'
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=10
|
||||
|
||||
|
||||
start() {
|
||||
flag=$(ps | grep "serverchan/serverchan" | grep -v "grep" | wc -l)
|
||||
if [ $flag -eq 0 ] ;then
|
||||
@ -12,7 +12,6 @@ else
|
||||
fi
|
||||
enable=$(uci get serverchan.serverchan.serverchan_enable)
|
||||
if [ $enable -eq 1 ]; then
|
||||
echo "enable"
|
||||
kill -9 $(ps | grep serverchan/serverchan | grep -v "grep" | awk '{print $1}') >/dev/null 2>&1
|
||||
sleep 1
|
||||
nohup /usr/bin/serverchan/serverchan 2>&1 &
|
||||
@ -23,7 +22,6 @@ stop() {
|
||||
kill -9 `pgrep -f serverchan/serverchan`
|
||||
enable=$(uci get serverchan.serverchan.serverchan_enable)
|
||||
if [ $enable -ne 1 ]; then
|
||||
echo 'stop!'
|
||||
kill $(pidof serverchan) >/dev/null 2>&1
|
||||
kill -9 $(ps | grep serverchan | grep -v "grep" | awk '{print $1}') >/dev/null 2>&1
|
||||
fi
|
||||
@ -33,5 +31,4 @@ restart(){
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
echo "restarted."
|
||||
}
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
touch /etc/config/serverchan
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@serverchan[-1]
|
||||
add ucitrack serverchan
|
||||
set ucitrack.@serverchan[-1].init=serverchan
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user