Skip to content

Instantly share code, notes, and snippets.

View juergenpf's full-sized avatar

Jürgen Pfeifer juergenpf

View GitHub Profile
@juergenpf
juergenpf / ovpn-writer.sh
Created October 21, 2021 18:49 — forked from renatolfc/ovpn-writer.sh
Script to generate an OpenVPN client configuration file in the unified format
#!/bin/sh
##
## Usage: ./ovpn-writer.sh SERVER CA_CERT CLIENT_CERT CLIENT_KEY SHARED_SECRET > client.ovpn
##
server=${1?"The server address is required"}
cacert=${2?"The path to the ca certificate file is required"}
client_cert=${3?"The path to the client certificate file is required"}
client_key=${4?"The path to the client private key file is required"}