Closed alneven closed 6 years ago
Hello @alneven, and thank you. Glad you like the image. I think I wrote in the README to try the gitter chat first, but that's ok ;)
As for your problem. You can't really run the script outside the container. You can mount it as a volume so it's inside - but then you also need to mount all the other paths the script refers to and if you want it to be runnable from both the inside and outside of the containers the paths need to be the same on each side (don't rename folders on mounts).
But I think for your usecase I would go for some kind of inotifywait solution. Have a look at this: https://unix.stackexchange.com/questions/24952/script-to-monitor-folder-for-new-files
You can either skip the "script-torrent-done" stuff and since you're using incomplete-folder then it will appear in completed once it's done. Or, if you want it to be triggered by transmission you could "bridge it" with inotifywait. For example have a script in the container that is triggered when torrents are done, that simply creates a file in some other mounted dir. Then the inotify-script can listen for events in that folder and delete the file - before running your script on the host.
It's at least a workaround that's not too ugly I think. Let me know how it goes ;)
yeah.. about gitter chat.. I saw it only today :-D
thanks for the idea, I will check it or maybe I will run the torrent-done script from crontab, like every 15-30 minutes as time doesn't matter in this case...
Like @haugene said, you can't run scripts, made for the container, outside the container. Although, you can keep the script inside the container and have a helper script execute the script inside the container if that makes any sense.
Closing for now. Re-open if you still have problems, or new questions about the solution.
hello haugene, nice job with the docker image-well done/thank you!
I have managed to switch over from a normal Transmission install into your docking environemnt almost without any issues. I used the DockerENV file and the variables for the docker compose. Now it's running and communicating with all other components.
Basically I'm have two ways to download torrents, the one is sonarr/radarr - the new wave and Flexget which is a command line/yml config based RSS reader.
For that "old world" I have a sort_script within Flexget. This is based on the download location. One bash script got triggered locally anytime when Transmission finish one download (doesn't matter if TV or Movie). The script itself is using the transmission remote client to verify which torrents are completed (seed ratio 3 /or seeded until 5 days) and after it gives Flexget an OK, to execute the move process to the proper place (based on tvdb parsing, IMDB details, local DL path etc.).
The question is, as flexget is directly on the local machine, installed from github, -- how can I start that script from the docker-transmission-openvpn container?
Until now it was part of my transmission config:
But I couldn't figured it out, how could I trigger this script, if the torrent finished within the docker container.
As you wrote in the readme, that for any question, we should open an "issue", even if it's a question. I would like to ask you kindly check my torrent-done script issue. And maybe if you have any idea, please let me know.
Have a nice day, A