Update myspeed.sh

pull/3195/head
CanbiZ 1 year ago committed by GitHub
parent c847974039
commit ebd8428cb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ct/myspeed.sh

@ -63,6 +63,7 @@ function update_script() {
fi fi
RELEASE=$(wget -q https://github.com/gnmyt/myspeed/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) RELEASE=$(wget -q https://github.com/gnmyt/myspeed/releases/latest -O - | grep "title>Release" | cut -d " " -f 5)
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping ${APP} Service" msg_info "Stopping ${APP} Service"
systemctl stop myspeed systemctl stop myspeed
msg_ok "Stopped ${APP} Service" msg_ok "Stopped ${APP} Service"
@ -76,7 +77,6 @@ function update_script() {
cd myspeed cd myspeed
npm install >/dev/null 2>&1 npm install >/dev/null 2>&1
echo "${RELEASE}" >/opt/${APP}_version.txt echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}" msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting ${APP} Service" msg_info "Starting ${APP} Service"

Loading…
Cancel
Save