Files

46 lines
1.0 KiB
Bash
Raw Permalink Normal View History

2023-03-22 20:48:20 -04:00
#!/usr/bin/env bash
# Copyright (c) 2021-2026 tteck
2023-03-22 20:48:20 -04:00
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://sonarr.tv/ | Github: https://github.com/Sonarr/Sonarr
2023-03-22 20:48:20 -04:00
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
2023-03-22 20:48:20 -04:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y sqlite3 libicu-dev
2023-03-22 20:48:20 -04:00
msg_ok "Installed Dependencies"
fetch_and_deploy_gh_release "Sonarr" "Sonarr/Sonarr" "prebuild" "latest" "/opt/Sonarr" "Sonarr.main.*.linux-$(arch_resolve "x64" "arm64").tar.gz"
2024-01-03 12:08:10 -05:00
mkdir -p /var/lib/sonarr/
chmod 775 /var/lib/sonarr/
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/sonarr.service
[Unit]
Description=Sonarr Daemon
After=syslog.target network.target
2025-12-11 12:30:27 +01:00
2024-01-03 12:08:10 -05:00
[Service]
Type=simple
ExecStart=/opt/Sonarr/Sonarr -nobrowser -data=/var/lib/sonarr/
TimeoutStopSec=20
KillMode=process
Restart=on-failure
2025-12-11 12:30:27 +01:00
2024-01-03 12:08:10 -05:00
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now sonarr
2024-01-03 12:08:10 -05:00
msg_ok "Created Service"
2023-03-22 20:48:20 -04:00
motd_ssh
2023-05-15 07:39:30 -04:00
customize
cleanup_lxc