mirror of
https://github.com/theoleuthardt/homelab-docker-compose.git
synced 2026-06-05 23: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
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