New Script: Suwayomi-Server (#2139)

* add suwayomi-server script

* fix header

* Update ct/suwayomiserver.sh

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>

* Update ct/suwayomiserver.sh

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>

* fixes

* more fixes

* fixes

* Update json/suwayomi-server.json

Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com>

---------

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com>
This commit is contained in:
Slaviša Arežina 2025-02-11 10:55:27 +01:00 committed by GitHub
parent a71bdb6f06
commit c32e71cae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 158 additions and 0 deletions

66
ct/suwayomiserver.sh Normal file
View File

@ -0,0 +1,66 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: tremor021
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Suwayomi/Suwayomi-Server
APP="Suwayomi-Server"
TAGS="media;manga"
var_cpu="1"
var_ram="1024"
var_disk="4"
var_os="debian"
var_version="12"
var_unprivileged="1"
header_info "$APP"
base_settings
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /usr/bin/suwayomi-server ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -s 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"
msg_info "Stopping $APP"
systemctl stop suwayomi-server
msg_ok "Stopped $APP"
msg_info "Updating $APP to v${RELEASE}"
cd /tmp
URL=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1)
wget -q $URL
$STD dpkg -i /tmp/*.deb
msg_ok "Updated $APP to v${RELEASE}"
msg_info "Starting $APP"
systemctl start suwayomi-server
msg_ok "Started $APP"
msg_info "Cleaning Up"
rm -f *.deb
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}"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4567${CL}"

View File

@ -0,0 +1,53 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: tremor021
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Suwayomi/Suwayomi-Server
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
mc \
openjdk-17-jre \
libc++-dev
msg_ok "Installed Dependencies"
msg_info "Settting up Suwayomi-Server"
URL=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1)
RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q $URL
$STD dpkg -i *.deb
echo ${RELEASE} >/opt/suwayomi-server_version.txt
msg_ok "Done setting up Suwayomi-Server"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/suwayomi-server.service
[Unit]
Description=Suwayomi-Server Service
After=network.target
[Service]
ExecStart=/usr/bin/suwayomi-server
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now suwayomi-server
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -f *.deb
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

39
json/suwayomi-server.json Normal file
View File

@ -0,0 +1,39 @@
{
"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://github.com/Suwayomi/Suwayomi-Server/raw/master/server/src/main/resources/icon/faviconlogo.png",
"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 is conflicting with Kaspersky products. You need to disable Kaspersky in order to use this application.",
"type": "info"
}
]
}