Jump to content

Trying to create a script to make a PIA wiregaurd config for all the dockers that require it.

Recommended Posts

I'm trying to make a script that adds a wiregaurd file to my docker containers that need it, like my torrents.

This script is being made for PIA specifically and is based off their https://github.com/pia-foss/manual-connections repo.


My script downloads the repo that contains all the script files, then runs them using the command given in the repo above which creates a config at




What I want to know is that since I am using the config for VPN purposes, should I also be adding the port of the docker container to the vpn config?


# grab the current wiregaurd script from PIA
git clone https://github.com/pia-foss/manual-connections.git
cd manual-connections
find . -type f -exec chmod +x {} \;

# rFlood_VPN Config
sudo VPN_PROTOCOL=wireguard DISABLE_IPV6=yes DIP_TOKEN=no AUTOCONNECT=true PIA_PF=false PIA_DNS=true PIA_USER=p0000000 PIA_PASS=PIA_PASSWORD ./run_setup.sh

# Source file path

# rFlood_vpn Destination directory

# Destination file name

# Check if the source file exists
if [ -e "$source_file" ]; then
    # Create destination directory if it doesn't exist
    mkdir -p "$destination_directory"

    # Move and rename the file
    mv "$source_file" "$destination_directory/$destination_file"

    echo "File moved successfully to $destination_directory/$destination_file"
    echo "Source file $source_file not found."


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...