Giter Club home page Giter Club logo

Comments (5)

thelamer avatar thelamer commented on May 29, 2024
  1. The script simply needs to be readable by your container user ( the uid and gid you set when launchng) and executable so
chown youruid:yourgid yourscript.sh
chmod +x

Is enough

  1. This is an alpine image meaning find is just a symlink to a static binary with many linux utilities called busybox. execdir is not available and adding it will never be planned (containers are supposed to run one app not be a full linux environment)

modify your script to something like this:

#!/bin/bash
cd ${TR_TORRENT_DIR}/${TR_TORRENT_NAME}
unrar e -o- *.rar

There is no need to use find in this example as you are not actually looping through results you just want to unrar anything with the file extension .rar .

  1. You need to stop and take a hard look at the permissions of your bind mounted /downloads folder and the accompanying files inside of it.

On your HOST run:

ls -n

this should output lines like this:

drwxr-xr-x  10 1000 1000 4096 Jan 11 14:50 downloads

where 1000 is your UID and 1000 is your GID.

Make sure you are not only running the container as this UID and GID (options -e PGID= -e PUID=) but that on your host you chown the parent directory and all subdirectories to this user.

chown -R 1000:1000 /your/directory/here

If you are running windows, good luck.

from docker-transmission.

thejacer87 avatar thejacer87 commented on May 29, 2024

thanks for ur help

from docker-transmission.

lordvalium avatar lordvalium commented on May 29, 2024

So this might end up being more a a feature request/discussion

I've scoured the interwebz and figured out the best unrar script for post completion:

#!/bin/bash
find ${TR_TORRENT_DIR}/${TR_TORRENT_NAME} -name '*.rar' -execdir unrar e -o- {} \;

Works perfectly with a transmission-daemon on it's own.

I had 3 issues with this on docker:

  1. couldn't figure out the best way to add the script. so i ended up putting it in the config folder, but is still had perms issues so i chmod 777 and it worked. i would imagine there is a better way
  2. the version of find in the container is old(?) or custom(?), not too sure. but i do know that it s does NOT have the -execdir option, which i think might be necessary to keep the unpacked file in the correct dir. i tried using -exec option which i think leads to #3
  3. permission denied when extracting:
UNRAR 5.40 freeware      Copyright (c) 1993-2016 Alexander Roshal

Extracting from /downloads/complete/example_show/example_show.rar

Cannot create Example_show.mkv
Permission denied

linuxserver.io

Thanks, team linuxserver.io

sounds good. i will try

from docker-transmission.

d4g79 avatar d4g79 commented on May 29, 2024

was there a solution for this. i am getting the below error on transmission logs.

[2020-07-30 11:00:39.176] Stargirl.S01E11.720p.WEB.H264-BTX Calling script "/data/unrar.sh" (torrent.c:2270)
[2020-07-30 11:00:39.176] Stargirl.S01E11.720p.WEB.H264-BTX Error executing script "/data/unrar.sh" (13): Child process setup failed: Permission denied (torrent.c:2276)

from docker-transmission.

d4g79 avatar d4g79 commented on May 29, 2024

I have figured it out.

Running OMV5 with the Transmission-Openvpn docker. Issue was that the script would not ruin and this was due to the noexec under the disk where the script is being held. See below how to remove the noexec from the disk/s. Hope this helps others as it took me a while to find the issue and resolve it.

  1. SSH your server and become root.

  2. (type) nano /etc/openmediavault/config.xml (enter)

  3. F6 to search. Search for "noexec" or "mntent"

  4. Delete your instances of noexec. You can either delete it on all your disks, or just delete it from the disk that has this script.

  5. Cntrl X, Y, then Enter to save.

  6. Back at the prompt. For OMV 5: (type) omv-salt deploy run fstab (enter)
    For OMV 4: (type) omv-mkconf fstab (enter)

  7. (type) reboot (enter)

from docker-transmission.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.