ProxmoxVED/install/cleanuparr-install.sh
Lucas Zampieri 8a84b80e51
PR review v2
- Removed blank lines;
- Added config path;
- Removed messages already handled by the funcion;
- Update link for VED;

Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
2025-07-24 10:27:43 +01:00

48 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: community-scripts ORG
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Cleanuparr/Cleanuparr
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "Cleanuparr" "Cleanuparr/Cleanuparr" "prebuild" "latest" "/opt/cleanuparr" "*linux-amd64.zip"
msg_ok "Installed Cleanuparr"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/cleanuparr.service
[Unit]
Description=Cleanuparr Daemon
After=syslog.target network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/cleanuparr
ExecStart=/opt/cleanuparr/Cleanuparr
Restart=on-failure
RestartSec=5
Environment="PORT=11011"
Environment="CONFIG_DIR=/opt/cleanuparr/config"
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now cleanuparr
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"