This commit is contained in:
Slaviša Arežina 2025-07-30 17:07:41 +02:00 committed by GitHub
parent af88ff3dd4
commit 907be41752
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -27,16 +27,17 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
RELEASE=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest-rust/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "v([^"]+).*/\1/')
RELEASE=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest-rust/releases/latest | jq -r '.tag_name' | sed 's/^v//')
if [[ "${RELEASE}" != "$(cat ~/.librespeed 2>/dev/null)" ]] || [[ ! -f ~/.librespeed ]]; then if [[ "${RELEASE}" != "$(cat ~/.librespeed 2>/dev/null)" ]] || [[ ! -f ~/.librespeed ]]; then
msg_info "Stopping Services" msg_info "Stopping Services"
systemctl stop librespeed-rs systemctl stop librespeed_rs
msg_ok "Services Stopped" msg_ok "Services Stopped"
fetch_and_deploy_gh_release "librespeed-rust" "librespeed/speedtest-rust" "binary" "latest" "/opt/librespeed-rust" "librespeed-rs-x86_64-unknown-linux-gnu.deb" fetch_and_deploy_gh_release "librespeed-rust" "librespeed/speedtest-rust" "binary" "latest" "/opt/librespeed-rust" "librespeed-rs-x86_64-unknown-linux-gnu.deb"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start librespeed-rs systemctl start librespeed_rs
msg_ok "Started Service" msg_ok "Started Service"
else else
msg_ok "No update required. ${APP} is already at v${RELEASE}" msg_ok "No update required. ${APP} is already at v${RELEASE}"

View File

@ -16,7 +16,7 @@ update_os
fetch_and_deploy_gh_release "librespeed-rust" "librespeed/speedtest-rust" "binary" "latest" "/opt/librespeed-rust" "librespeed-rs-x86_64-unknown-linux-gnu.deb" fetch_and_deploy_gh_release "librespeed-rust" "librespeed/speedtest-rust" "binary" "latest" "/opt/librespeed-rust" "librespeed-rs-x86_64-unknown-linux-gnu.deb"
msg_info "Enabling Service" msg_info "Enabling Service"
systemctl enable -q --now speedtest_rs.service systemctl enable -q --now speedtest_rs
msg_ok "Enabled Service" msg_ok "Enabled Service"
motd_ssh motd_ssh