From fbb093844e9c85f7644838741dff2c6cb568e4d4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 3 Sep 2025 10:23:46 +0200 Subject: [PATCH] fixes --- ct/uhf.sh | 37 +++++++++++++++++++------------------ install/uhf-install.sh | 5 ++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ct/uhf.sh b/ct/uhf.sh index 308c6296..09a30202 100644 --- a/ct/uhf.sh +++ b/ct/uhf.sh @@ -27,28 +27,29 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_info "Stopping ${APP}" - systemctl stop uhf-server - msg_ok "Stopped ${APP}" + if check_for_gh_release "uhf-server" "swapplications/uhf-server-dist"; then + msg_info "Stopping Service" + systemctl stop uhf-server + msg_ok "Stopped Service" - msg_info "Updating APT packages" - $STD apt-get update - $STD apt-get -y upgrade - msg_ok "Package list updated" + msg_info "Updating APT packages" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Package list updated" - fetch_and_deploy_gh_release "comskip" "swapplications/comskip" "prebuild" "latest" "/opt/comskip" "comskip-x64-*.zip" - fetch_and_deploy_gh_release "uhf-server" "swapplications/uhf-server-dist" "prebuild" "latest" "/opt/uhf-server" "UHF.Server-linux-x64-*.zip" + fetch_and_deploy_gh_release "comskip" "swapplications/comskip" "prebuild" "latest" "/opt/comskip" "comskip-x64-*.zip" + fetch_and_deploy_gh_release "uhf-server" "swapplications/uhf-server-dist" "prebuild" "latest" "/opt/uhf-server" "UHF.Server-linux-x64-*.zip" - msg_info "Starting ${APP}" - systemctl start uhf-server - msg_ok "Started ${APP}" + msg_info "Starting Service" + systemctl start uhf-server + msg_ok "Started Service" - msg_info "Cleaning up" - $STD apt-get -y autoremove - $STD apt-get -y autoclean - msg_ok "Cleaned" - - msg_ok "Updated Successfully" + msg_info "Cleaning up" + $STD apt-get -y autoremove + $STD apt-get -y autoclean + msg_ok "Cleaned" + msg_ok "Updated Successfully" + fi exit } diff --git a/install/uhf-install.sh b/install/uhf-install.sh index 8b9ddf84..c0447cf3 100644 --- a/install/uhf-install.sh +++ b/install/uhf-install.sh @@ -34,9 +34,8 @@ fetch_and_deploy_gh_release "comskip" "swapplications/comskip" "prebuild" "lates fetch_and_deploy_gh_release "uhf-server" "swapplications/uhf-server-dist" "prebuild" "latest" "/opt/uhf-server" "UHF.Server-linux-x64-*.zip" msg_info "Creating Service" -service_path="" cat </etc/systemd/system/uhf-server.service -echo "[Unit] +[Unit] Description=UHF Server service After=syslog.target network-online.target [Service] @@ -47,7 +46,7 @@ ExecStart=/opt/uhf-server/uhf-server [Install] WantedBy=multi-user.target EOF -systemctl enable --now -q uhf-server.service +systemctl enable -q --now uhf-server msg_ok "Created Service" motd_ssh