1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-03-08 13:19:05 +00:00

New script: cross-seed (#2186)

This commit is contained in:
Jakub Matraszek 2025-02-12 10:04:27 +01:00 committed by GitHub
parent ba636ed25d
commit 8181518c24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 156 additions and 0 deletions

54
ct/cross-seed.sh Normal file
View File

@ -0,0 +1,54 @@
#!/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: Jakub Matraszek (jmatraszek)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.cross-seed.org
APP="cross-seed"
var_tags="arr"
var_cpu="1"
var_ram="1024"
var_disk="2"
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 command -v cross-seed &> /dev/null; then
current_version=$(cross-seed --version)
latest_version=$(npm show cross-seed version)
if [ "$current_version" != "$latest_version" ]; then
msg_info "Updating ${APP} from version v${current_version} to v${latest_version}"
npm install -g cross-seed@latest &> /dev/null
systemctl restart cross-seed
msg_ok "Updated Successfully"
else
msg_ok "${APP} is already at v${current_version}"
fi
else
msg_error "No ${APP} Installation Found!"
exit
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 cross-seed API using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:2468${CL}"

View File

@ -0,0 +1,63 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Jakub Matraszek (jmatraszek)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.cross-seed.org
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 \
gnupg
msg_ok "Installed Dependencies"
msg_info "Setting up Node.js Repository"
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_23.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
msg_ok "Setup Node.js Repository"
msg_info "Setting up Node.js"
$STD apt-get update
$STD apt-get install -y nodejs
msg_ok "Setup Node.js"
msg_info "Setup Cross-Seed"
$STD npm install cross-seed@latest -g
$STD cross-seed gen-config
msg_ok "Setup Cross-Seed"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/cross-seed.service
[Unit]
Description=Cross-Seed daemon Service
After=network.target
[Service]
ExecStart=cross-seed daemon
Restart=always
User=root
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now cross-seed
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

39
json/cross-seed.json Normal file
View File

@ -0,0 +1,39 @@
{
"name": "cross-seed",
"slug": "cross-seed",
"categories": [
14
],
"date_created": "2025-02-07",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 2468,
"documentation": "https://www.cross-seed.org/docs/category/basics",
"website": "https://www.cross-seed.org/",
"logo": "https://www.cross-seed.org/img/cross-seed.svg",
"description": "cross-seed is an app designed to help you download torrents that you can cross seed based on your existing torrents. It is designed to match conservatively to minimize manual intervention.",
"install_methods": [
{
"type": "default",
"script": "ct/cross-seed.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 2,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "After the installation cross-seed will fail to start with an empty configuration. To fix this, edit `~/.cross-seed/config.js` to properly configure cross-seed, then restart by running `systemctl restart cross-seed`.",
"type": "info"
}
]
}