mirror of
https://github.com/theoleuthardt/homelab-docker-compose.git
synced 2026-06-05 15:41:07 +00:00
feat: new service
This commit is contained in:
parent
68c4028674
commit
9e1934b7f6
2 changed files with 71 additions and 0 deletions
47
qbit/docker-compose.yaml
Normal file
47
qbit/docker-compose.yaml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
---
|
||||
services:
|
||||
#############
|
||||
#QBITTORRENT
|
||||
#############
|
||||
qbittorrent:
|
||||
image: lscr.io/linuxserver/qbittorrent:latest
|
||||
container_name: qbittorrent
|
||||
network_mode: "service:gluetun"
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Etc/UTC
|
||||
- WEBUI_PORT=8181
|
||||
- TORRENTING_PORT=6881
|
||||
volumes:
|
||||
- media-automation_qbit_config:/config
|
||||
- qbit_downloads:/downloads
|
||||
restart: unless-stopped
|
||||
|
||||
############
|
||||
#GLUETUN
|
||||
############
|
||||
gluetun:
|
||||
container_name: gluetun
|
||||
image: qmcgaw/gluetun
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
ports:
|
||||
- 8181:8181 #qbittorent
|
||||
- 6881:6881 #qbittorent
|
||||
- 6881:6881/udp #qbittorent
|
||||
environment:
|
||||
- VPN_SERVICE_PROVIDER=mullvad
|
||||
- VPN_TYPE=wireguard
|
||||
- WIREGUARD_PRIVATE_KEY=25M80NgTTbnKmuSBfjmiHiuTlMpp1tCZz8uTrFoE838=
|
||||
- WIREGUARD_ADDRESSES=10.70.11.21/32
|
||||
- SERVER_CITIES=Berlin
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
media-automation_qbit_config:
|
||||
external: True
|
||||
qbit_downloads:
|
||||
external: True
|
||||
24
qbit/scripts/post_download.sh
Executable file
24
qbit/scripts/post_download.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# qBittorrent Post-Download Script
|
||||
# Verschiebt fertige Downloads von /downloads nach /games
|
||||
|
||||
TORRENT_NAME="$1"
|
||||
CONTENT_PATH="$2"
|
||||
SAVE_PATH="$3"
|
||||
|
||||
TARGET_DIR="/games"
|
||||
|
||||
# Nur verschieben wenn aus /downloads
|
||||
if [[ "$SAVE_PATH" == /downloads* ]]; then
|
||||
mkdir -p "$TARGET_DIR"
|
||||
|
||||
if [ -d "$CONTENT_PATH" ]; then
|
||||
# Ordner verschieben
|
||||
mv "$CONTENT_PATH" "$TARGET_DIR/"
|
||||
elif [ -f "$CONTENT_PATH" ]; then
|
||||
# Datei verschieben
|
||||
mv "$CONTENT_PATH" "$TARGET_DIR/"
|
||||
fi
|
||||
|
||||
echo "$(date): Moved '$TORRENT_NAME' to $TARGET_DIR" >> /scripts/post_download.log
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue