mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Update myspeed.sh
This commit is contained in:
parent
c847974039
commit
ebd8428cb0
1 changed files with 32 additions and 32 deletions
|
@ -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"
|
||||||
|
@ -91,7 +91,7 @@ function update_script() {
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue