Apply suggestions from code review
reptile suggestions merge Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
bf8fdb3c06
commit
852ac484ed
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/sonobarr/misc/build.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: GoldenSpringness
|
# Author: GoldenSpringness
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@ -24,7 +24,7 @@ function update_script() {
|
|||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
|
|
||||||
if [[ ! -f "/opt/sonobarr" ]]; then
|
if [[ ! -d "/opt/sonobarr" ]]; then
|
||||||
msg_error "No sonobarr Installation Found!"
|
msg_error "No sonobarr Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -14,19 +14,19 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "sonobarr" "Dodelidoo-Labs/sonobarr" "tarball"
|
fetch_and_deploy_gh_release "sonobarr" "Dodelidoo-Labs/sonobarr" "tarball"
|
||||||
cd /opt/sonobarr
|
msg_info "Setting up sonobarr"
|
||||||
|
|
||||||
msg_info "Setting up sonobarr"
|
msg_info "Setting up sonobarr"
|
||||||
apt install python3.13-venv -y
|
$STD apt-get install -y python3.13-venv
|
||||||
python3 -m venv venv
|
$STD python3 -m venv /opt/sonobarr/venv
|
||||||
source venv/bin/activate
|
source /opt/sonobarr/venv/bin/activate
|
||||||
pip install --no-cache-dir -r requirements.txt
|
$STD pip install --no-cache-dir -r /opt/sonobarr/requirements.txt
|
||||||
mv ".sample-env" ".env"
|
mv ".sample-env" ".env"
|
||||||
sed -i "s/^secret_key=.*/secret_key=$(openssl rand -hex 16)/" .env
|
sed -i "s/^secret_key=.*/secret_key=$(openssl rand -hex 16)/" .env
|
||||||
msg_ok "Set up sonobarr"
|
msg_ok "Set up sonobarr"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/sonobarr.service
|
cat <<EOF>/etc/systemd/system/sonobarr.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=sonobarr Service
|
Description=sonobarr Service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user