Skip to content

Commit

Permalink
keep custom cert when sysupgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
1715173329 committed Feb 16, 2020
1 parent c826670 commit 885f3c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LUCI_DEPENDS:=+bash +busybox +coreutils-nohup +curl +dnsmasq-full +ipset +libope
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-unblockneteasemusic
PKG_VERSION:=2.7
PKG_RELEASE:=3
PKG_RELEASE:=4

PKG_MAINTAINER:=[CTCGFW]Project-OpenWrt

Expand Down
6 changes: 3 additions & 3 deletions root/etc/init.d/unblockneteasemusic
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ start()
sed -i -e "1i const key = '${youtube_key}'" "/usr/share/unblockneteasemusic/core/src/provider/youtube.js"
fi

{ [ -f "${self_issue_cert_crt}" ] && [ "${self_issue_cert_crt}" != "/usr/share/unblockneteasemusic/core/server.crt" ]; } && ln -sf "${self_issue_cert_crt}" "/usr/share/unblockneteasemusic/core/server.crt"
{ [ -f "${self_issue_cert_key}" ] && [ "${self_issue_cert_key}" != "/usr/share/unblockneteasemusic/core/server.key" ]; } && ln -sf "${self_issue_cert_key}" "/usr/share/unblockneteasemusic/core/server.key"
{ [ -f "${self_issue_cert_crt}" ] && [ "${self_issue_cert_crt}" != "/usr/share/unblockneteasemusic/core/server.crt" ]; } && { ln -sf "${self_issue_cert_crt}" "/usr/share/unblockneteasemusic/core/server.crt"; sed -i "#${self_issue_cert_crt}#d"; echo "${self_issue_cert_crt}" >> "/etc/sysupgrade.conf"; }
{ [ -f "${self_issue_cert_key}" ] && [ "${self_issue_cert_key}" != "/usr/share/unblockneteasemusic/core/server.key" ]; } && { ln -sf "${self_issue_cert_key}" "/usr/share/unblockneteasemusic/core/server.key"; sed -i "#${self_issue_cert_key}#d"; echo "${self_issue_cert_key}" >> "/etc/sysupgrade.conf"; }

[ "${hijack_ways}" = "use_hosts" ] && { http_port="80"; https_port="443"; }
if [ "${music_source}" = "default" ]; then
Expand Down Expand Up @@ -172,7 +172,7 @@ stop()
sed -i '/unblockneteasemusic/d' "/etc/crontabs/root"
/etc/init.d/cron restart > "/dev/null" 2>&1

sed -i '/unblockneteasemusic/d' "/etc/sysupgrade.conf"
sed -i '#unblockneteasemusic/core#d' "/etc/sysupgrade.conf"
[ "${keep_core_when_upgrade}" -eq "1" ] && { echo "/usr/share/unblockneteasemusic/core/" >> "/etc/sysupgrade.conf"; echo "/usr/share/unblockneteasemusic/local_ver" >> "/etc/sysupgrade.conf"; }

rm -f "/tmp/unblockneteasemusic.log"
Expand Down

0 comments on commit 885f3c5

Please sign in to comment.