Skip to content

Commit c32e71c

Browse files
tremor021michelroegl-brunnerMickLeskbvdberg01
authored
New Script: Suwayomi-Server (#2139)
* add suwayomi-server script * fix header * Update ct/suwayomiserver.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * Update ct/suwayomiserver.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * fixes * more fixes * fixes * Update json/suwayomi-server.json Co-authored-by: bvdberg01 <[email protected]> --------- Co-authored-by: Michel Roegl-Brunner <[email protected]> Co-authored-by: CanbiZ <[email protected]> Co-authored-by: bvdberg01 <[email protected]>
1 parent a71bdb6 commit c32e71c

File tree

3 files changed

+158
-0
lines changed

3 files changed

+158
-0
lines changed

ct/suwayomiserver.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: tremor021
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Suwayomi/Suwayomi-Server
7+
8+
APP="Suwayomi-Server"
9+
TAGS="media;manga"
10+
var_cpu="1"
11+
var_ram="1024"
12+
var_disk="4"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
base_settings
19+
20+
variables
21+
color
22+
catch_errors
23+
24+
function update_script() {
25+
header_info
26+
check_container_storage
27+
check_container_resources
28+
29+
if [[ ! -f /usr/bin/suwayomi-server ]]; then
30+
msg_error "No ${APP} Installation Found!"
31+
exit
32+
fi
33+
RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
34+
if [[ "${RELEASE}" != "$(cat /opt/suwayomi-server_version.txt)" ]] || [[ ! -f /opt/suwayomi-server_version.txt ]]; then
35+
msg_info "Updating $APP"
36+
msg_info "Stopping $APP"
37+
systemctl stop suwayomi-server
38+
msg_ok "Stopped $APP"
39+
msg_info "Updating $APP to v${RELEASE}"
40+
cd /tmp
41+
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)
42+
wget -q $URL
43+
$STD dpkg -i /tmp/*.deb
44+
msg_ok "Updated $APP to v${RELEASE}"
45+
msg_info "Starting $APP"
46+
systemctl start suwayomi-server
47+
msg_ok "Started $APP"
48+
msg_info "Cleaning Up"
49+
rm -f *.deb
50+
msg_ok "Cleanup Completed"
51+
echo "${RELEASE}" >/opt/suwayomi-server_version.txt.txt
52+
msg_ok "Update Successful"
53+
else
54+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
55+
fi
56+
exit
57+
}
58+
59+
start
60+
build_container
61+
description
62+
63+
msg_ok "Completed Successfully!\n"
64+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
65+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
66+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4567${CL}"

install/suwayomiserver-install.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: tremor021
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Suwayomi/Suwayomi-Server
7+
8+
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt-get install -y \
18+
curl \
19+
sudo \
20+
mc \
21+
openjdk-17-jre \
22+
libc++-dev
23+
msg_ok "Installed Dependencies"
24+
25+
msg_info "Settting up Suwayomi-Server"
26+
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)
27+
RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
28+
wget -q $URL
29+
$STD dpkg -i *.deb
30+
echo ${RELEASE} >/opt/suwayomi-server_version.txt
31+
msg_ok "Done setting up Suwayomi-Server"
32+
msg_info "Creating Service"
33+
cat <<EOF >/etc/systemd/system/suwayomi-server.service
34+
[Unit]
35+
Description=Suwayomi-Server Service
36+
After=network.target
37+
38+
[Service]
39+
ExecStart=/usr/bin/suwayomi-server
40+
Restart=always
41+
42+
[Install]
43+
WantedBy=multi-user.target
44+
EOF
45+
systemctl enable -q --now suwayomi-server
46+
msg_ok "Created Service"
47+
motd_ssh
48+
customize
49+
msg_info "Cleaning up"
50+
rm -f *.deb
51+
$STD apt-get -y autoremove
52+
$STD apt-get -y autoclean
53+
msg_ok "Cleaned"

json/suwayomi-server.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "Suwayomi-Server",
3+
"slug": "suwayomi-server",
4+
"categories": [
5+
13
6+
],
7+
"date_created": "2025-02-07",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 4567,
12+
"documentation": "https://github.com/Suwayomi/Suwayomi-Server/wiki",
13+
"website": "https://github.com/Suwayomi/Suwayomi-Server",
14+
"logo": "https://github.com/Suwayomi/Suwayomi-Server/raw/master/server/src/main/resources/icon/faviconlogo.png",
15+
"description": "A free and open source manga reader server that runs extensions built for Mihon (Tachiyomi).",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/suwayomiserver.sh",
20+
"resources": {
21+
"cpu": 1,
22+
"ram": 1024,
23+
"hdd": 4,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "This application is conflicting with Kaspersky products. You need to disable Kaspersky in order to use this application.",
36+
"type": "info"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)