Skip to content

Commit 3822f68

Browse files
Add seanime (ct)
1 parent ff252a8 commit 3822f68

3 files changed

Lines changed: 138 additions & 0 deletions

File tree

ct/headers/seanime

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_____ _
2+
/ ___/___ ____ _____ (_)___ ___ ___
3+
\__ \/ _ \/ __ `/ __ \/ / __ `__ \/ _ \
4+
___/ / __/ /_/ / / / / / / / / / / __/
5+
/____/\___/\__,_/_/ /_/_/_/ /_/ /_/\___/
6+

ct/seanime.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env bash
2+
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
3+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
4+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
5+
# Copyright (c) 2021-2026 community-scripts ORG
6+
# Author: hasan-ismail
7+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
8+
# Source: https://seanime.app/
9+
10+
APP="Seanime"
11+
var_tags="${var_tags:-media;anime;manga}"
12+
var_cpu="${var_cpu:-2}"
13+
var_ram="${var_ram:-2048}"
14+
var_disk="${var_disk:-8}"
15+
var_os="${var_os:-debian}"
16+
var_version="${var_version:-13}"
17+
var_arm64="${var_arm64:-yes}"
18+
var_unprivileged="${var_unprivileged:-1}"
19+
var_gpu="${var_gpu:-yes}"
20+
21+
header_info "$APP"
22+
variables
23+
color
24+
catch_errors
25+
26+
function update_script() {
27+
header_info
28+
check_container_storage
29+
check_container_resources
30+
31+
if [[ ! -d /opt/seanime ]]; then
32+
msg_error "No ${APP} Installation Found!"
33+
exit
34+
fi
35+
36+
if check_for_gh_release "seanime" "5rahim/seanime"; then
37+
msg_info "Stopping Service"
38+
systemctl stop seanime
39+
msg_ok "Stopped Service"
40+
41+
create_backup /opt/seanime-data/config.toml
42+
43+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "seanime" "5rahim/seanime" "prebuild" "latest" "/opt/seanime" "seanime-[0-9]*_Linux_$(arch_resolve x86_64 arm64).tar.gz"
44+
chmod +x /opt/seanime/seanime
45+
46+
restore_backup
47+
48+
msg_info "Starting Service"
49+
systemctl start seanime
50+
msg_ok "Started Service"
51+
msg_ok "Updated successfully!"
52+
fi
53+
exit
54+
}
55+
56+
start
57+
build_container
58+
description
59+
60+
msg_ok "Completed Successfully!\n"
61+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
62+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
63+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:43211${CL}"
64+
echo -e "${INFO}${YW} Credentials saved in:${CL}"
65+
echo -e "${TAB}/root/seanime.creds"

install/seanime-install.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: hasan-ismail
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://seanime.app/
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+
setup_hwaccel
17+
18+
msg_info "Installing FFmpeg"
19+
setup_deb822_repo \
20+
"jellyfin" \
21+
"https://repo.jellyfin.org/jellyfin_team.gpg.key" \
22+
"https://repo.jellyfin.org/debian" \
23+
"$(get_os_info codename)"
24+
$STD apt install -y jellyfin-ffmpeg7
25+
ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
26+
ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
27+
msg_ok "Installed FFmpeg"
28+
29+
fetch_and_deploy_gh_release "seanime" "5rahim/seanime" "prebuild" "latest" "/opt/seanime" "seanime-[0-9]*_Linux_$(arch_resolve x86_64 arm64).tar.gz"
30+
chmod +x /opt/seanime/seanime
31+
32+
msg_info "Configuring Seanime"
33+
SEANIME_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
34+
mkdir -p /opt/seanime-data
35+
cat <<EOF >/opt/seanime-data/config.toml
36+
[server]
37+
password = "${SEANIME_PASSWORD}"
38+
EOF
39+
cat <<EOF >/root/seanime.creds
40+
Seanime URL: http://${LOCAL_IP}:43211
41+
Password: ${SEANIME_PASSWORD}
42+
EOF
43+
msg_ok "Configured Seanime"
44+
45+
msg_info "Creating Service"
46+
cat <<EOF >/etc/systemd/system/seanime.service
47+
[Unit]
48+
Description=Seanime
49+
After=network.target
50+
51+
[Service]
52+
Type=simple
53+
User=root
54+
WorkingDirectory=/opt/seanime
55+
ExecStart=/opt/seanime/seanime --datadir /opt/seanime-data --host 0.0.0.0
56+
Restart=on-failure
57+
RestartSec=5
58+
59+
[Install]
60+
WantedBy=multi-user.target
61+
EOF
62+
systemctl enable -q --now seanime
63+
msg_ok "Created Service"
64+
65+
motd_ssh
66+
customize
67+
cleanup_lxc

0 commit comments

Comments
 (0)