Move sensitive config to .env file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 22:39:15 -05:00
parent ae2e924322
commit 434b1cfa70
4 changed files with 29 additions and 18 deletions

View File

@@ -28,7 +28,11 @@ Uploads are intentionally **not** counted as activity — they're what you're tr
sudo chmod +x /opt/arr/slskd/scripts/auto-disconnect.sh
```
2. Edit the configuration variables at the top of the script (`SLSKD_URL`, `SLSKD_USER`, `SLSKD_PASS`, `CONTAINER_NAME`, etc.)
2. Create a `.env` file from the example:
```bash
sudo cp .env.example /opt/arr/slskd/scripts/.env
sudo nano /opt/arr/slskd/scripts/.env
```
3. Add a cron job (as root):
```bash
@@ -40,23 +44,16 @@ Uploads are intentionally **not** counted as activity — they're what you're tr
## Configuration
Variables at the top of the script:
The script loads a `.env` file from its own directory. See `.env.example` for all available options.
| Variable | Default | Description |
|----------|---------|-------------|
| `SLSKD_URL` | `http://localhost:5030` | slskd API base URL |
| `SLSKD_USER` | `slskd` | slskd web UI username |
| `SLSKD_PASS` | `slskd` | slskd web UI password |
| `CONTAINER_NAME` | `slskd` | Docker container name |
| `LOG_CHECK_MIN` | `5` | How far back to check docker logs (minutes) |
| `LOG_MAX_LINES` | `500` | Max log file lines before truncation |
Environment variable overrides:
| Variable | Default | Description |
|----------|---------|-------------|
| `SLSKD_IDLE_TIMEOUT` | `30` | Minutes of inactivity before disconnect |
| `SLSKD_GOTIFY_TOKEN` | *(empty)* | Gotify app token for push notifications |
| `GOTIFY_URL` | *(empty)* | Gotify server URL for push notifications |
| `GOTIFY_TOKEN` | *(empty)* | Gotify app token for push notifications |
## Logs