Re-Add: Suwayomi-Server (#6458)

This commit is contained in:
CanbiZ 2025-08-01 21:05:16 +02:00 committed by GitHub
parent 084ceae9d9
commit 61fb45a0b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 44 additions and 26 deletions

View File

@ -28,34 +28,20 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
if dpkg -l | grep -q "openjdk-17-jre"; then
$STD apt-get remove -y openjdk-17-jre
fi
JAVA_VERSION=21 setup_java
RELEASE=$(curl -fsSL https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/suwayomi-server_version.txt)" ]] || [[ ! -f /opt/suwayomi-server_version.txt ]]; then
msg_info "Updating $APP"
if [[ "${RELEASE}" != "$(cat ~/.suwayomi-server 2>/dev/null)" ]] || [[ ! -f ~/.suwayomi-server ]]; then
JAVA_VERSION=21 setup_java
msg_info "Stopping $APP"
systemctl stop suwayomi-server
msg_ok "Stopped $APP"
msg_info "Updating $APP to v${RELEASE}"
temp_file=$(mktemp)
RELEASE=$(curl -fsSL https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/Suwayomi/Suwayomi-Server/releases/download/${RELEASE}/Suwayomi-Server-${RELEASE}-debian-all.deb" -o "$temp_file"
$STD dpkg -i "$temp_file"
msg_ok "Updated $APP to v${RELEASE}"
fetch_and_deploy_gh_release "suwayomi-server" "Suwayomi/Suwayomi-Server" "binary"
msg_info "Starting $APP"
systemctl start suwayomi-server
msg_ok "Started $APP"
msg_info "Cleaning Up"
rm -f "$temp_file"
msg_ok "Cleanup Completed"
echo "${RELEASE}" >/opt/suwayomi-server_version.txt.txt
msg_ok "Update Successful"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"

View File

@ -0,0 +1,40 @@
{
"name": "Suwayomi-Server",
"slug": "suwayomi-server",
"categories": [
13
],
"date_created": "2025-02-07",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 4567,
"documentation": "https://github.com/Suwayomi/Suwayomi-Server/wiki",
"website": "https://github.com/Suwayomi/Suwayomi-Server",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/suwayomi.webp",
"config_path": "",
"description": "A free and open source manga reader server that runs extensions built for Mihon (Tachiyomi).",
"install_methods": [
{
"type": "default",
"script": "ct/suwayomiserver.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 4,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "This application can be conflicting with Kaspersky products. You maybe need to disable Kaspersky in order to use this application.",
"type": "info"
}
]
}

View File

@ -18,14 +18,7 @@ $STD apt-get install -y libc++-dev
msg_ok "Installed Dependencies"
JAVA_VERSION=21 setup_java
msg_info "Settting up Suwayomi-Server"
temp_file=$(mktemp)
RELEASE=$(curl -fsSL https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/Suwayomi/Suwayomi-Server/releases/download/${RELEASE}/Suwayomi-Server-${RELEASE}-debian-all.deb" -o "$temp_file"
$STD dpkg -i "$temp_file"
echo "${RELEASE}" >/opt/suwayomi-server_version.txt
msg_ok "Done setting up Suwayomi-Server"
fetch_and_deploy_gh_release "suwayomi-server" "Suwayomi/Suwayomi-Server" "binary"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/suwayomi-server.service
@ -47,7 +40,6 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -f "$temp_file"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"