From 725ea9408787d5db44a38b5b264ffb424b131875 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Wed, 21 Jan 2026 14:29:28 +0300 Subject: [PATCH] added env file --- install/sonobarr-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/sonobarr-install.sh b/install/sonobarr-install.sh index 72a45b9be..5a247b656 100644 --- a/install/sonobarr-install.sh +++ b/install/sonobarr-install.sh @@ -21,6 +21,8 @@ apt install python3.13-venv -y python3 -m venv venv source venv/bin/activate pip install --no-cache-dir -r requirements.txt +mv ".sample-env" ".env" +sed -i "s/^secret_key=.*/secret_key=$(openssl rand -hex 16)/" .env msg_ok "Set up sonobarr" msg_info "Creating Service" @@ -31,8 +33,9 @@ After=network.target [Service] WorkingDirectory=/opt/sonobarr/src +EnvironmentFile=/opt/sonobarr/.env Environment="PATH=/opt/sonobarr/venv/bin" -ExecStart=/bin/bash -c 'gunicorn src.Sonobarr:app -c gunicorn_config.py' +ExecStart=/bin/bash -c 'gunicorn Sonobarr:app -c ../gunicorn_config.py' Restart=always [Install]