started building the script

This commit is contained in:
GoldenSpring 2025-12-25 21:12:03 +03:00
parent 44706b2426
commit a9fcf80b36
No known key found for this signature in database
GPG Key ID: 75701174BCB6A808
2 changed files with 105 additions and 0 deletions

62
ct/sonobarr.sh Normal file
View File

@ -0,0 +1,62 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: GoldenSpringness
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Dodelidoo-Labs/sonobarr
APP="sonobarr"
var_tags="${var_tags:-pastebin;storage}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-20}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f "/opt/sonobarr" ]]; then
msg_error "No sonobarr Installation Found!"
exit
fi
if check_for_gh_release "sonobarr" "Dodelidoo-Labs/sonobarr"; then
msg_info "Stopping sonobarr"
systemctl stop sonobarr
msg_ok "Stopped sonobarr"
msg_info "Creating Backup"
tar -czf "/opt/sonobarr_backup_$(date +%F).tar.gz" "/opt/sonobarr/upload"
msg_ok "Backup Created"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sonobarr" "Dodelidoo-Labs/sonobarr" "tarball"
msg_info "Updating sonobarr"
cd /opt/sonobarr
msg_ok "Updated sonobarr"
msg_info "Starting sonobarr"
systemctl start sonobarr
msg_ok "Started sonobarr"
msg_ok "Update sonobarr"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}rustypaste setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"

View File

@ -0,0 +1,43 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: GoldenSpringness
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/Dodelidoo-Labs/sonobarr
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
setup_python
fetch_and_deploy_gh_release "sonobarr" "Dodelidoo-Labs/sonobarr" "tarball"
msg_info "Setting up sonobarr"
cd /opt/sonobarr
pip install --no-cache-dir -r requirements.txt
msg_ok "Set up sonobarr"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/sonobarr
[Unit]
Description=sonobarr Service
After=network.target
[Service]
WorkingDirectory=/opt/sonobarr
ExecStart=/bin/bash -c 'gunicorn src.Sonobarr:app -c gunicorn_config.py'
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now sonobarr
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc