Comments (18)
Hey, and thanks :)
When I exec'ed into the container it doesn't seem unrar is installed.
root@3d1f6f2b91c2:/# unrar
bash: unrar: command not found
When you checked 'which unrar' and it said '/bin/unrar', was that on the commandline to your Synology, or inside the container? The script will be executed by transmission inside the container where unrar does not exist.
I added rar and unrar to the container, they are nice to have tools for simple scripts like this. Pull the image again using the dev tag and let me know how it goes ;)
from docker-transmission-openvpn.
Hi ethanopp,
Not sure I can be of much help, but I can tell you how I have configured it.
In my docker run script I have added:
-v /volume1/downloads/:/data \
-e "TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED=true" \
-e "TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME=/data/extract_torrent.sh" \
And I have placed extract_torrent.sh in:
/volume1/downloads
extract_torrent.sh looks like this:
#!/bin/bash
CUR_DIR=`pwd`
cd $TR_TORRENT_DIR
test -d "$TR_TORRENT_NAME" && cd "$TR_TORRENT_NAME"
unrar e -inul *.rar
7z e *.zip > /dev/null 2>&1
cd $CUR_DIR
Hope it helps.
from docker-transmission-openvpn.
@zaphod007 great work :-)
Without having tried this I assume you can simply change the lines:
unrar e -inul *.rar
7z e *.zip > /dev/null 2>&1
To something like:
unrar e -inul *.rar PATH_TO_DIR
7z e *-zip -oPATH_TO_DIR > /dev/null 2>&1
Where PATH_TO_DIR could be something like:
/volume1/my-extracted-files
from docker-transmission-openvpn.
works like a charm (just needed to add a blank space between -o and PATH in the last line and path to dir= /data/unrar/, thank you so much @mightymads !
from docker-transmission-openvpn.
Man you rule! Now my script is able to unrar files - sweet.
Would it be possible to add unzip, 7z or similar to the container as well?
For you question about 'which unrar' I must admit that I was doing a lot of hacking while trying to make unrar work so not really sure how correct my answer would be actually. Can we just leave it at that ;)
Thanks again for a fast fix!
from docker-transmission-openvpn.
Haha, no worries. Let's leave it at that :)
I added zip and unzip as well, I guess that covers the basics of packing and unpacking stuff. You can check it out, it's on the dev tag for now. I'm gonna merge it to master sometime soon, just got to clean up a little first.
from docker-transmission-openvpn.
Fix is merged to master and available on the main tag. That should close this...
from docker-transmission-openvpn.
Mange tak :-)
from docker-transmission-openvpn.
Bare hyggelig
from docker-transmission-openvpn.
mightymads / haugene,
I realize this issue is closed but was hoping you could help shed a little light on exactly how you pointed your container to the script...
I have the following simple script saved as a "unrar.sh"
#!/bin/bash find /data/completed/Sonarr -name '*.rar' -execdir unrar e -o- {} \;
In my docker run I have the following volume mounted
-v "/share/CACHEDEV1_DATA/Library/Application Support/Transmission-AirVPN":/unrar \
and then in my DockerEnv, I have
TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED=true TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME= "/unrar/unrar.sh"
The unrar.sh file is placed in /share/CACHEDEV1_DATA/Library/Application Support/Transmission-AirVPN
When I run the container I get the following error:
/etc/transmission/start.sh: 58: export: /unrar/unrar.sh: bad variable name
What am I doing wrong?
from docker-transmission-openvpn.
Thanks for the quick response!
Looking at your code actually made me realize an error in mine...
I had a space between
TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME= "/unrar/unrar.sh"
Updating to this seems to avoid the error I was previously getting TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME="/unrar/unrar.sh"
Now I'm just downloading something to see if my bash script works, may have to steal yours if it doesn't.
Thanks again!
from docker-transmission-openvpn.
Script doesn't seem to work when a download completes...
What is odd though is if I SSH into the container and manually run the script, it works as expected.
Any other ideas?
I've set the scripts permissions to 0777
from docker-transmission-openvpn.
Restarted everything... seems to be working now.
Thanks again for the help!
from docker-transmission-openvpn.
@haugene I didn't want to open a new issue about this since it's likely intentional / by-design, but is there a chance that the image could change in such a way that automatically extracting rar/zip/etc either Just Worked(tm) or could be turned on with a single boolean setting? It's completely fine if not, of course, and this thread is perfect for how to get a script going that'll handle it, but I just wanted to see if it was possible to have something more "in the box". 😄 Maybe something like the script from @mightymads being included in the transmission dir (looks like the image already includes the things the script depends on AFAICT) so it would end up in /etc/transmission in the image, then the default TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME could point to it and a user would only need to turn on TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED for this (I would imagine common?) case? Thanks!!
from docker-transmission-openvpn.
Hi!
I'm not opposed to a boolean switch saying "unzip/untar stuff automatically and bundling a script for it. I'd suggest you create a new issue for it, describe the need and link it to this issue and the script you're mentioning and then see if someone can help bundle it. I'm not sure I'll be able to look at it in a while, kind of moving and changing jobs, so a lot happening :)
from docker-transmission-openvpn.
Hello all,
after a long journey as a total noob I got everything working thanks to countless hours of reading through this and other material, however I still lack some basic skill obviously as I cant figure out what/how to change the script to move the unpacked items in a specific directory on my data mount instead of the same directory where the rar files are. Can somebody help me? This is what I use and it works for me, thanks to @mightymads post above:
In my docker run script I have added:
-v /volume1/downloads/:/data
-e "TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED=true"
-e "TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME=/data/extract_torrent.sh" \
And I have placed extract_torrent.sh in:
/volume1/downloads
extract_torrent.sh looks like this:
#!/bin/bash
CUR_DIR=pwd
cd $TR_TORRENT_DIR
test -d "$TR_TORRENT_NAME" && cd "$TR_TORRENT_NAME"
unrar e -inul *.rar
7z e *.zip > /dev/null 2>&1
cd $CUR_DIR
from docker-transmission-openvpn.
Just wanted to thank the poster for their script and haugene for implementing unrar and that 3 years after posting, this post is still useful.
from docker-transmission-openvpn.
Hello all,
after a long journey as a total noob I got everything working thanks to countless hours of reading through this and other material, however I still lack some basic skill obviously as I cant figure out what/how to change the script to move the unpacked items in a specific directory on my data mount instead of the same directory where the rar files are. Can somebody help me? This is what I use and it works for me, thanks to @mightymads post above: In my docker run script I have added: -v /volume1/downloads/:/data -e "TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED=true" -e "TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME=/data/extract_torrent.sh" \
And I have placed extract_torrent.sh in: /volume1/downloads
extract_torrent.sh looks like this: #!/bin/bash CUR_DIR=
pwd
cd $TR_TORRENT_DIR test -d "$TR_TORRENT_NAME" && cd "$TR_TORRENT_NAME" unrar e -inul *.rar 7z e *.zip > /dev/null 2>&1 cd $CUR_DIR
Hi there, found this thread while trying to implement my own unrar when a torrent is completed, so thanks all!
One question I can't figure out: Where does the $TR_TORRENT_NAME environment variable get set? Is that something that is only available once a torrent is downloaded temporarily? When I docker exec into my transmission container, I don't see this as a variable. Thanks in advance! And hope people are still reading this :)
from docker-transmission-openvpn.
Related Issues (20)
- Addon crashing, "bindPort error" after running the addon for a day HOT 2
- Container healthcheck fails for NordVPN HOT 2
- Can't connect to UI but container is connected to the VPN HOT 2
- Issue with large video files
- Can't install openssl1.1 HOT 1
- Web UI taking too long to respond HOT 3
- High CPU usage HOT 13
- download-dir override not working HOT 3
- Let other containers use the VPN has some IP leaks HOT 1
- Container exiting after ping timeout, stuck in a loop HOT 11
- Container seems to star fine, but cannot reach & killed after 5 mins
- WebUI login not asked in Firefox HOT 1
- Problem resolved itself
- su: cannot set groups: Operation not permitted HOT 5
- Downloads stall with "too many open files" HOT 5
- Documentation show `x.protonvpn.net.udp` while file are named `x.protonvpn.udp` HOT 1
- NordVPN CDN Down? HOT 1
- Included firewall not aware of peer port in the transmission configuration
- Transmission web ui not displayed; curl returns unauthorised HOT 1
- AUTH_FAILED, data channel cipher negotiation failed (no shared cipher) HOT 102
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-transmission-openvpn.