From e6cd7a8dbe5c16cf88dcc348e2552d63c0693b16 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Sun, 8 Dec 2019 06:47:45 -0800 Subject: [PATCH] luci-app-unblockmusic: keep ca.crt and server key after upgrade --- package/lean/luci-app-unblockmusic/Makefile | 2 +- .../root/lib/upgrade/keep.d/unblockmusic | 3 +++ .../root/usr/share/UnblockNeteaseMusic/logcheck.sh | 4 ++-- .../root/usr/share/UnblockNeteaseMusic/update_core.sh | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 package/lean/luci-app-unblockmusic/root/lib/upgrade/keep.d/unblockmusic diff --git a/package/lean/luci-app-unblockmusic/Makefile b/package/lean/luci-app-unblockmusic/Makefile index edc8e0255b4aba..f8cdfe9c74223c 100644 --- a/package/lean/luci-app-unblockmusic/Makefile +++ b/package/lean/luci-app-unblockmusic/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-unblockmusic PKG_VERSION:=2.2.0 -PKG_RELEASE:=10 +PKG_RELEASE:=11 PKG_LICENSE:=Apache-2.0 diff --git a/package/lean/luci-app-unblockmusic/root/lib/upgrade/keep.d/unblockmusic b/package/lean/luci-app-unblockmusic/root/lib/upgrade/keep.d/unblockmusic new file mode 100644 index 00000000000000..4f44321e286d4e --- /dev/null +++ b/package/lean/luci-app-unblockmusic/root/lib/upgrade/keep.d/unblockmusic @@ -0,0 +1,3 @@ +/usr/share/UnblockNeteaseMusic/ca.crt +/usr/share/UnblockNeteaseMusic/server.crt +/usr/share/UnblockNeteaseMusic/server.key \ No newline at end of file diff --git a/package/lean/luci-app-unblockmusic/root/usr/share/UnblockNeteaseMusic/logcheck.sh b/package/lean/luci-app-unblockmusic/root/usr/share/UnblockNeteaseMusic/logcheck.sh index 168020537da0cd..4d8eb1001e12ef 100755 --- a/package/lean/luci-app-unblockmusic/root/usr/share/UnblockNeteaseMusic/logcheck.sh +++ b/package/lean/luci-app-unblockmusic/root/usr/share/UnblockNeteaseMusic/logcheck.sh @@ -1,11 +1,11 @@ #!/bin/bash -log_max_size="10" #使用KB计算 +log_max_size="100" #使用KB计算 log_file="/tmp/unblockmusic.log" while true do - sleep 10s + sleep 30s icount=`busybox ps -w | grep app.js |grep -v grep| wc -l` if [ $icount -ne 2 ] ;then /etc/init.d/unblockmusic restart diff --git a/package/lean/luci-app-unblockmusic/root/usr/share/UnblockNeteaseMusic/update_core.sh b/package/lean/luci-app-unblockmusic/root/usr/share/UnblockNeteaseMusic/update_core.sh index 51705698b8f46e..649c5ac6036fcd 100755 --- a/package/lean/luci-app-unblockmusic/root/usr/share/UnblockNeteaseMusic/update_core.sh +++ b/package/lean/luci-app-unblockmusic/root/usr/share/UnblockNeteaseMusic/update_core.sh @@ -10,7 +10,7 @@ function clean_log(){ } function check_latest_version(){ - latest_ver="$(wget -O- https://github.com/nondanee/UnblockNeteaseMusic/commits/master |tr -d '\n' |grep -Eo 'commit\/[0-9a-z]+' |sed -n 1p |sed 's#commit/##g')" + latest_ver="$(wget-ssl --no-check-certificate -O- https://github.com/nondanee/UnblockNeteaseMusic/commits/master |tr -d '\n' |grep -Eo 'commit\/[0-9a-z]+' |sed -n 1p |sed 's#commit/##g')" [ -z "${latest_ver}" ] && echo -e "\nFailed to check latest version, please try again later." >>/tmp/unblockmusic_update.log && exit 1 if [ ! -e "/usr/share/UnblockNeteaseMusic/local_ver" ]; then clean_log