-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract initialization of config as a separate step
- Loading branch information
Showing
1 changed file
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ commands: | |
sudo add-apt-repository ppa:wireguard/wireguard -y | ||
sudo apt-get update | ||
sudo apt-get install wireguard-dkms wireguard-tools linux-headers-$(uname -r) | ||
connect: | ||
description: "Connect to WireGuard VPN" | ||
initialize: | ||
description: "Initialize WireGuard" | ||
parameters: | ||
config: | ||
description: | | ||
|
@@ -35,6 +35,9 @@ commands: | |
sed "s/0.0.0.0\/0/$(curl -s https://ifconfig.me)/g" > wg0.conf | ||
sudo mv wg0.conf /etc/wireguard/wg0.conf | ||
sudo chmod 600 /etc/wireguard/wg0.conf | ||
connect: | ||
description: "Connect to WireGuard VPN" | ||
steps: | ||
- run: | ||
name: Connect to VPN | ||
command: | | ||
|
@@ -55,12 +58,13 @@ example: | |
usage: | ||
version: 2.1 | ||
orbs: | ||
wg: titel-media/[email protected] | ||
vpn: titel-media/[email protected] | ||
jobs: | ||
ping: | ||
executor: wg/default | ||
executor: vpn/default | ||
steps: | ||
- wg/install | ||
- wg/connect | ||
- vpn/install | ||
- vpn/initialize | ||
- vpn/connect | ||
- run: ping -c 5 192.0.2.1 | ||
- wg/disconnect | ||
- vpn/disconnect |