Skip to content

Instantly share code, notes, and snippets.

View OrdinaryScript's full-sized avatar
🎯
Focusing

OrdinaryScript

🎯
Focusing
View GitHub Profile
@OrdinaryScript
OrdinaryScript / ovpn-writer.sh
Created March 9, 2023 21:50 — 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"}