mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 14:13:30 +00:00
luci-app-unblockmusic: add deamon monitor process
This commit is contained in:
parent
700739398d
commit
61964b6aa5
@ -11,12 +11,12 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-unblockmusic
|
||||
PKG_VERSION:=2.2.0
|
||||
PKG_RELEASE:=8
|
||||
PKG_RELEASE:=9
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
LUCI_TITLE:=LuCI support for Unblock NeteaseCloudMusic
|
||||
LUCI_DEPENDS:=+UnblockNeteaseMusic +bash +dnsmasq-full +ipset +bash
|
||||
LUCI_DEPENDS:=+UnblockNeteaseMusic +bash +dnsmasq-full +ipset
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_MAINTAINER:=lean
|
||||
|
@ -1,10 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
log_max_size="4" #使用KB计算
|
||||
log_max_size="10" #使用KB计算
|
||||
log_file="/tmp/unblockmusic.log"
|
||||
|
||||
while true
|
||||
do
|
||||
sleep 10s
|
||||
icount=`busybox ps -w | grep app.js |grep -v grep| wc -l`
|
||||
if [ $icount -ne 2 ] ;then
|
||||
/etc/init.d/unblockmusic restart
|
||||
fi
|
||||
(( log_size = "$(ls -l "${log_file}" | awk -F ' ' '{print $5}')" / "1024" ))
|
||||
(( "${log_size}" >= "${log_max_size}" )) && echo "" > /tmp/unblockmusic.log
|
||||
sleep 10m
|
||||
|
Loading…
Reference in New Issue
Block a user