-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear how to use port.dat with Transmission #3
Comments
I run a short script in a bare-bones 'helper' container to keep an eye on I'm not familiar with Transmission, but for Deluge I'm using something like this and then adding the following service to the compose file:
|
Thanks - I guess I'll do something similar for Transmission. Feels like we should be able to take some kind of input as a hook to run in the Appreciate the clues and Deluge examples, thanks! |
FYI, this works for Transmission (along with minor edit of your
I prefer to wait on the file being touched vs waking up every 30s, but that's just personal preference. |
I have this Docker Running on UNRAID and this is what I used. #!/bin/bash trap 'exit 0' SIGTERM OLDPORT=0 while true
cp "/mnt/user/appdata/WireGuard_PIA/pia-shared/port.dat" "/mnt/user/appdata/WireGuard_PIA/pia-shared/oldport.dat"
done Using the userscripts plugin started at array. It may be improved but it is working for me. just make sure to set qbittorrent to start with plenty delay so it gives the other docker time to start and get the port forward. |
@ScottESanDiego |
@zilexa I made a new container which runs the script. The Dockerfile is trivial:
That Basically I start the transmission & my new container via Docker Compose. The new container runs continuously, but is tiny and largely idle (blocking on the |
@ScottESanDiego I just came across this post on reddit, instead of modifying the qbittorrent.conf file (which would require to stop and start qbittorrent), apperently you should be able to use the API:
I will see if I can create a script based on yours but with the API. |
For Qbittorrent, this is how to use the API:
output should be:
Notice you have a green icon in the webUI now, even though in Settings you still see the old port. |
It's a pretty basic Dockerfile. You can see the script get added in the
Dockerfile at
#3 (comment)
…On Sat, Dec 25, 2021 at 6:41 AM Rick ***@***.***> wrote:
@ScottESanDiego <https://github.com/ScottESanDiego> How do you add the
script to the dockerfile? where does the script have to be located in order
for it to find it? I am using portainer but also tried it in terminal. Can
you explain how you created this dockerfile and where the scripts should be
located?
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQKP4CXAIHUMT5D2KKCKILUSXJ2TANCNFSM4RMJP5UQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In case you want to run with this in kubernetes, I build a small project which can be used as a sidecar. It reads the port.dat from this container and updates transmission running in the same pod. It also provides a health check so k8s can restart the pod in case the vpn port forwarding is not working properly. |
ok, so 3ish years later, this did not work for me exactly but after a few changes, it does now. (Thanks to Scott for his ideas and work on this)
The compose section looks like the below, the VPN port.dat file is mounted to the host OS and picked up by the container in the post by @ScottESanDiego listed above.
|
I have
wireguard-pia
andtransmission
working fine, but I'm not sure what the best practice is for using theport.dat
to allow incoming connections to Transmission. My Docker-compose is like this (slightly redacted):I get a
port.dat
file with a port number in it...should I setup atransmission-remote
to push that as the port into Transmission? If so, what's a good programmatic way to do that? (I don't see a Transmission way to invoke a script on start, and making a container just to do the RPC call to push the port seems..overkill, and I don't want to override any of the entrypoints...)The text was updated successfully, but these errors were encountered: