Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

[help wanted] [enhancement] - Executing script after tunnel up #88

Open
Ricardo-0101 opened this issue Sep 30, 2021 · 0 comments · May be fixed by #108
Open

[help wanted] [enhancement] - Executing script after tunnel up #88

Ricardo-0101 opened this issue Sep 30, 2021 · 0 comments · May be fixed by #108
Assignees
Labels
enhancement New feature or request

Comments

@Ricardo-0101
Copy link

Ricardo-0101 commented Sep 30, 2021

Sorry if this is the wrong place to post this, I've been struggling to work out how with this container to execute a script once the tunnel comes up. The purpose if this is to update via an API the IP assigned to the VPN.

As a fallback I know I can add up /pathtoscript/script.sh to my .ovpn file but I suspect there is a more elegant way to do this, hopefully configurable with an evinronment variable. The haugene container for example exectutes /scripts/openvpn-post-config.sh.

Current setup

version: "3.3"
services:
  alpine-qbittorrent-openvpn:
    container_name: alpine-qbittorrent-openvpn
    restart: unless-stopped
    image: guillaumedsde/alpine-qbittorrent-openvpn:latest #guillaumedsde/alpine-qbittorrent-openvpn:dd4cd24 
    volumes:
      - /mnt/downloads/:/downloads
      - /mnt/temp_downloads:/temp_downloads
      - ${USERDIR}/docker/qbittorrent:/config
      - ${USERDIR}/docker/shared/######/##########:/config/openvpn/config.ovpn
      - ${USERDIR}/docker/shared/###:/###
      - ${USERDIR}/docker/qbittorrent/scripts:/scripts
      - /etc/localtime:/etc/localtime:ro
    environment:
      - OPENVPN_PROVIDER= #Leave empty if provider not in the supported list
      - OPENVPN_USERNAME=###########
      - OPENVPN_PASSWORD=#########
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - QBT_WEBUI_PORT=8090
      - LAN=#############
    ports:
      - "8090:8090" #Unifi controller uses 8080
    cap_add:
      - NET_ADMIN
    labels:
      - com.centurylinklabs.watchtower.enable=true
@Ricardo-0101 Ricardo-0101 added the bug Something isn't working label Sep 30, 2021
@Ricardo-0101 Ricardo-0101 changed the title Executing script after tunnel up [help wanted] [enhancement] - Executing script after tunnel up Sep 30, 2021
@guillaumedsde guillaumedsde added enhancement New feature or request and removed bug Something isn't working labels Oct 1, 2021
@jaype87 jaype87 linked a pull request Dec 17, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants