Compare commits

...

1 Commits

Author SHA1 Message Date
b5f8aa5618 Refactor: Threadfin (+ updateble) 2025-07-07 10:30:09 +02:00
3 changed files with 23 additions and 15 deletions

View File

@ -27,12 +27,24 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
msg_info "Updating $APP"
systemctl stop threadfin.service RELEASE=$(curl -fsSL https://api.github.com/repos/threadfin/threadfin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/Threadfin/Threadfin/releases/latest/download/Threadfin_linux_amd64" -o "/opt/threadfin/threadfin" if [[ "${RELEASE}" != "$(cat ~/.threadfin 2>/dev/null)" ]] || [[ ! -f ~/.threadfin ]]; then
chmod +x /opt/threadfin/threadfin
systemctl start threadfin.service msg_info "Stopping $APP"
msg_ok "Updated $APP" systemctl stop threadfin
msg_ok "Stopped $APP"
fetch_and_deploy_gh_release "threadfin" "threadfin/threadfin" "singlefile" "latest" "/opt/threadfin" "Threadfin_linux_amd64"
msg_info "Starting $APP"
systemctl start threadfin
msg_ok "Started $APP"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"
fi
exit exit
} }

View File

@ -6,7 +6,7 @@
], ],
"date_created": "2024-06-12", "date_created": "2024-06-12",
"type": "ct", "type": "ct",
"updateable": false, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 34400, "interface_port": 34400,
"documentation": null, "documentation": null,

View File

@ -14,16 +14,12 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y ffmpeg $STD apt-get install -y \
$STD apt-get install -y vlc ffmpeg \
vlc
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Threadfin" fetch_and_deploy_gh_release "threadfin" "threadfin/threadfin" "singlefile" "latest" "/opt/threadfin" "Threadfin_linux_amd64"
mkdir -p /opt/threadfin
curl -fsSL "https://github.com/Threadfin/Threadfin/releases/latest/download/Threadfin_linux_amd64" -o "/opt/threadfin/threadfin"
chmod +x /opt/threadfin/threadfin
msg_ok "Installed Threadfin"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/threadfin.service cat <<EOF >/etc/systemd/system/threadfin.service