fixes
This commit is contained in:
parent
7d679aaef7
commit
fbb093844e
11
ct/uhf.sh
11
ct/uhf.sh
@ -27,9 +27,10 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Stopping ${APP}"
|
||||
if check_for_gh_release "uhf-server" "swapplications/uhf-server-dist"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop uhf-server
|
||||
msg_ok "Stopped ${APP}"
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating APT packages"
|
||||
$STD apt-get update
|
||||
@ -39,16 +40,16 @@ function update_script() {
|
||||
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}"
|
||||
msg_info "Starting Service"
|
||||
systemctl start uhf-server
|
||||
msg_ok "Started ${APP}"
|
||||
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"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
|
@ -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 <<EOF >/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
|
||||
|
Loading…
x
Reference in New Issue
Block a user