Linuxserver.io Extract

General support for problems installing or using Deluge
killahb33
New User
New User
Posts: 1
Joined: Thu Feb 27, 2020 4:01 pm

Linuxserver.io Extract

Postby killahb33 » Thu Feb 27, 2020 4:05 pm

Hi All,
It seems if I want help that this is the place to get it!
I am looking for info on how people are doing extracting with this docker setup.
I have tried execute with the below setup and I have tried simple extractor but no luck.
I am using labels and move after completed.
Thanks!

/config/extract.sh <id> <na> <dl>

Code: Select all

#!/bin/bash
formats=(zip rar)
commands=([zip]="unzip -u" [rar]="unrar -o- e")

torrentid=$1
torrentname=$2
torrentpath=$3

echo "Torrent Details: " "$torrentname" "$torrentpath" "$torrentid"  >> /tmp/execute_script.log

log()
{
    logger -t deluge-extractarchives "$@"
}

log "Torrent complete: $@"
cd "${torrentpath}"
for format in "${formats[@]}"; do
    while read file; do
        log "Extracting \"$file\""
        cd "$(dirname "$file")"
        file=$(basename "$file")
        ${commands[$format]} "$file"
    done < <(find "$torrentpath/$torrentname" -iname "*.${format}" )
done


Just realized I should add that permission on the script is 755 and manually running the script from bash works as expected.

Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests