arch-qbittorrentvpn icon indicating copy to clipboard operation
arch-qbittorrentvpn copied to clipboard

Issues adding .sh script on TUN up.

Open BanditTech opened this issue 3 years ago • 11 comments

When attempting to follow the directions for a private tracker, they require an update of the IP from which qbit is downloading. I can run the command in the container manually, and it works. But if I add in the additional CLI options for OPVN it has this issue.

      - VPN_OPTIONS=--script-security 2 --up /config/tun_up.sh

adding this to the compose causes this to occur:

today at 8:28:07 PM 2021-07-11 20:28:07,576 DEBG 'start-script' stdout output:
today at 8:28:07 PM 2021-07-11 20:28:07 Multiple --up scripts defined.  The previously configured script is overridden.

This is the .sh which is just one line:

#!/bin/bash
curl -c /config/mam.cookies -b /config/mam.cookies https://t.myanonamouse.net/json/dynamicSeedbox.php

This essentially bricks the entire setup as nothing else finishes configuring.

Is there a better way for me to inject a script into the startup?

BanditTech avatar Jul 12 '21 03:07 BanditTech

was hoping to hear something, I am just manually running the script every once in a while from inside the container... :P

BanditTech avatar Jul 22 '21 05:07 BanditTech

I have the same issue... ever found a solution, besides modifying the Dockerfile?

szethh avatar Nov 28 '21 20:11 szethh

on the server host, it has a timer which runs, and sends the command to the docker container to run that script.

I think I set it to run every 2 hours.

This was the simplest solution I could figure without needing to edit the docker container file itself

BanditTech avatar Nov 29 '21 03:11 BanditTech

I had the same exact issue and was able to solve it by passing VPN_OPTIONS --route-up /config/tun_up.sh However, in my tun_up.sh I added "sleep 5" to introduce a 5 sec delay before the curl command is called. From what I remember, not everything would initialize and the curl would fail otherwise

SoCraDi avatar Dec 22 '21 05:12 SoCraDi