Skip to content

Commit

Permalink
Handle modifying relative and absolute ca paths
Browse files Browse the repository at this point in the history
  • Loading branch information
haugene committed Sep 4, 2021
1 parent 15dd494 commit 3aa8daa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openvpn/modify-openvpn-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ fi
if [[ $CONFIG_MOD_CA_CERTS == "1" ]]; then
echo "Modification: Change ca certificate path"
config_directory=$(dirname "$CONFIG")
sed -i -E "s#ca\s+#ca $config_directory/#g" "$CONFIG"

# Some configs are already adjusted, need to handle both relative and absolute paths, like:
# ca /etc/openvpn/mullvad/ca.crt
# ca ca.ipvanish.com.crt
sed -E "s#ca\s+(.*/)*#ca $config_directory/#g" "$CONFIG"
fi

## Option 3 - Update ping options to exit the container, so Docker will restart it
Expand Down

0 comments on commit 3aa8daa

Please sign in to comment.