Skip to content

Commit 57a299f

Browse files
push-app-to-main[bot]MickLesktremor021
authored
Cleanuparr (#6238)
* 'Add new script' * Update cleanuparr.sh * Update cleanuparr.sh * Update cleanuparr-install.sh * Update frontend/public/json/cleanuparr.json Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update frontend/public/json/cleanuparr.json --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
1 parent 7272c8d commit 57a299f

4 files changed

Lines changed: 143 additions & 0 deletions

File tree

ct/cleanuparr.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Lucas Zampieri (zampierilucas) | MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Cleanuparr/Cleanuparr
7+
8+
APP="Cleanuparr"
9+
var_tags="${var_tags:-arr}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-1024}"
12+
var_disk="${var_disk:-4}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -f /opt/cleanuparr/Cleanuparr ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
RELEASE=$(curl -fsSL https://api.github.com/repos/Cleanuparr/Cleanuparr/releases/latest | jq -r '.tag_name' | sed 's/^v//')
32+
if [[ "${RELEASE}" != "$(cat ~/.Cleanuparr 2>/dev/null)" ]] || [[ ! -f ~/.Cleanuparr ]]; then
33+
msg_info "Stopping ${APP}"
34+
systemctl stop cleanuparr
35+
msg_ok "Stopped ${APP}"
36+
37+
fetch_and_deploy_gh_release "Cleanuparr" "Cleanuparr/Cleanuparr" "prebuild" "$RELEASE" "/opt/cleanuparr" "*linux-amd64.zip"
38+
39+
msg_info "Starting ${APP}"
40+
systemctl start cleanuparr
41+
msg_ok "Started ${APP}"
42+
msg_ok "Updated Successfully"
43+
else
44+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
45+
fi
46+
exit
47+
}
48+
49+
start
50+
build_container
51+
description
52+
53+
msg_ok "Completed Successfully!\n"
54+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
55+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
56+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:11011${CL}"

ct/headers/cleanuparr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
________
2+
/ ____/ /__ ____ _____ __ ______ ____ _________
3+
/ / / / _ \/ __ `/ __ \/ / / / __ \/ __ `/ ___/ ___/
4+
/ /___/ / __/ /_/ / / / / /_/ / /_/ / /_/ / / / /
5+
\____/_/\___/\__,_/_/ /_/\__,_/ .___/\__,_/_/ /_/
6+
/_/
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Cleanuparr",
3+
"slug": "cleanuparr",
4+
"categories": [
5+
14
6+
],
7+
"date_created": "2025-07-23",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 11011,
12+
"documentation": "https://cleanuparr.github.io/Cleanuparr/docs/",
13+
"website": "https://github.com/Cleanuparr/Cleanuparr",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/cleanuparr.webp",
15+
"config_path": "/opt/cleanuparr/config",
16+
"description": "Cleanuparr is a tool for automating the cleanup of unwanted or blocked files in Sonarr, Radarr, and supported download clients like qBittorrent, Transmission, and Deluge. It removes incomplete, blocked, or malicious downloads and can trigger replacement searches to ensure your media library stays complete and up-to-date.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/cleanuparr.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 1024,
24+
"hdd": 4,
25+
"os": "debian",
26+
"version": "12"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

install/cleanuparr-install.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Lucas Zampieri (zampierilucas) | MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Cleanuparr/Cleanuparr
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+
fetch_and_deploy_gh_release "Cleanuparr" "Cleanuparr/Cleanuparr" "prebuild" "latest" "/opt/cleanuparr" "*linux-amd64.zip"
17+
18+
msg_info "Creating Service"
19+
cat <<EOF >/etc/systemd/system/cleanuparr.service
20+
[Unit]
21+
Description=Cleanuparr Daemon
22+
After=syslog.target network.target
23+
24+
[Service]
25+
Type=simple
26+
User=root
27+
WorkingDirectory=/opt/cleanuparr
28+
ExecStart=/opt/cleanuparr/Cleanuparr
29+
Restart=on-failure
30+
RestartSec=5
31+
Environment="PORT=11011"
32+
Environment="CONFIG_DIR=/opt/cleanuparr/config"
33+
34+
[Install]
35+
WantedBy=multi-user.target
36+
EOF
37+
systemctl enable -q --now cleanuparr
38+
msg_ok "Created Service"
39+
40+
motd_ssh
41+
customize
42+
43+
msg_info "Cleaning up"
44+
$STD apt-get -y autoremove
45+
$STD apt-get -y autoclean
46+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)