提交 61964b6a 编写于 作者: L lean

luci-app-unblockmusic: add deamon monitor process

上级 70073939
......@@ -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
......
#!/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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册