'Add new script' (#7644)

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
This commit is contained in:
push-app-to-main[bot] 2025-09-15 09:54:23 +02:00 committed by GitHub
parent 34b1d70762
commit 89c3410f6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 165 additions and 0 deletions

6
ct/headers/scraparr Normal file
View File

@ -0,0 +1,6 @@
_____
/ ___/______________ _____ ____ ___________
\__ \/ ___/ ___/ __ `/ __ \/ __ `/ ___/ ___/
___/ / /__/ / / /_/ / /_/ / /_/ / / / /
/____/\___/_/ \__,_/ .___/\__,_/_/ /_/
/_/

63
ct/scraparr.sh Normal file
View File

@ -0,0 +1,63 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: JasonGreenC
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/thecfu/scraparr
APP="Scraparr"
var_tags="${var_tags:-arr;monitoring}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/scraparr/ ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "scraparr" "thecfu/scraparr"; then
msg_info "Stopping Services"
systemctl stop scraparr
msg_ok "Services Stopped"
PYTHON_VERSION="3.12" setup_uv
fetch_and_deploy_gh_release "scrappar" "thecfu/scraparr" "tarball" "latest" "/opt/scraparr"
msg_info "Updating Scraparr"
cd /opt/scraparr
$STD uv venv /opt/scraparr/.venv
$STD /opt/scraparr/.venv/bin/python -m ensurepip --upgrade
$STD /opt/scraparr/.venv/bin/python -m pip install --upgrade pip
$STD /opt/scraparr/.venv/bin/python -m pip install -r /opt/scraparr/src/scraparr/requirements.txt
chmod -R 755 /opt/scraparr
msg_ok "Updated Scraparr"
msg_info "Starting Services"
systemctl start scraparr
msg_ok "Services Started"
msg_ok "Updated Successfully"
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}:7100${CL}"

View File

@ -0,0 +1,40 @@
{
"name": "Scraparr",
"slug": "scraparr",
"categories": [
14
],
"date_created": "2025-07-29",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 7100,
"documentation": "https://github.com/thecfu/scraparr/blob/main/README.md",
"website": "https://github.com/thecfu/scraparr",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/scraparr-dark.svg",
"config_path": "/scraparr/config/config.yaml",
"description": "Scraparr is a Prometheus exporter for the *arr suite (Sonarr, Radarr, Lidarr, etc.). It provides metrics that can be scraped by Prometheus to monitor and visualize the health and performance of your *arr applications.",
"install_methods": [
{
"type": "default",
"script": "ct/scraparr.sh",
"resources": {
"cpu": 2,
"ram": 1024,
"hdd": 4,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Edit config file then restart the scraparr service: `systemctl restart scraparr`",
"type": "info"
}
]
}

View File

@ -0,0 +1,56 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: JasonGreenC
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/thecfu/scraparr
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
PYTHON_VERSION="3.13" setup_uv
fetch_and_deploy_gh_release "scrappar" "thecfu/scraparr" "tarball" "latest" "/opt/scraparr"
msg_info "Installing Scraparr"
cd /opt/scraparr
$STD uv venv /opt/scraparr/.venv
$STD /opt/scraparr/.venv/bin/python -m ensurepip --upgrade
$STD /opt/scraparr/.venv/bin/python -m pip install --upgrade pip
$STD /opt/scraparr/.venv/bin/python -m pip install -r /opt/scraparr/src/scraparr/requirements.txt
chmod -R 755 /opt/scraparr
mkdir -p /scraparr/config
mv /opt/scraparr/config.yaml /scraparr/config/config.yaml
chmod -R 755 /scraparr
msg_ok "Installed Scraparr"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/scraparr.service
[Unit]
Description=Scraparr
Wants=network-online.target
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/scraparr/src
ExecStart=/opt/scraparr/.venv/bin/python -m scraparr.scraparr
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now scraparr
msg_ok "Configured Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"