luci-app-unblockmusic: keep ca.crt and server key after upgrade

This commit is contained in:
LEAN-ESX 2019-12-08 06:47:45 -08:00
parent 177c62711a
commit e6cd7a8dbe
4 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -0,0 +1,3 @@
/usr/share/UnblockNeteaseMusic/ca.crt
/usr/share/UnblockNeteaseMusic/server.crt
/usr/share/UnblockNeteaseMusic/server.key

View File

@ -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

View File

@ -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