Skip to content
No description or website provided.
Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Oct 23, 2019
README.md
get_wireguard.sh Remove cleanup from error_exit Jan 6, 2020
uninstall_wireguard.sh Remove cleanup from error_exit Jan 6, 2020

README.md

Download and install WireGuard on Ubiquiti edge devices

Warning: This script attempts to preserve your running configuration, however you should have a backup of your configuration before running this script.

This script will reference Lochnair/vyatta-wireguard repo for WireGuard releases. It will download, install, and setup the package to install post firmware upgrade. Rebooting the device is not required after running this script as long as the script did not generate any errors. Grab the script by running the following commands from the web CLI or SSH.

cd /config/scripts
curl -LO --silent https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/get_wireguard.sh
chmod +x get_wireguard.sh

Note: Best practice is to save scripts into /config/scripts directory.

Usage

To download and install the latest release of WireGuard, run the following command.

./get_wireguard.sh

To download and install a specific release of WireGuard, run the following command with the desired release as a parameter.

./get_wireguard.sh 0.0.20190913-1

Log

The script writes a log to /tmp/get_wireguard.log. This log file will be removed after reboot of the device.

Automation

To automatically run this script once per week, you can run the following commands from an EdgeMAX device.

configure
set system task-scheduler task get_wireguard executable path /config/scripts/get_wireguard.sh
set system task-scheduler task get_wireguard interval 7d
commit
save
exit

Uninstall

To uninstall WireGuard, run the following command.

sg vyattacfg "$(curl -sL https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/uninstall_wireguard.sh)"
You can’t perform that action at this time.