From 34e463d0b484e78c58674f09057ace7abe55f070 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Fri, 5 Feb 2021 11:02:26 +0100 Subject: [PATCH 1/4] Add features to readme --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e632e38..f265c22 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,24 @@ -# Download and install WireGuard on Ubiquiti edge devices +# Introduction ***Warning:*** _This script attempts to preserve your running configuration, however you should have a backup of your configuration before running this script._ + +This script installs and maintaince the wireguard vpn solution on a ubiquiti router. + +*Features* + +* Single line install +* Automatically detect used hardware +* Proper upgrade process preserving configuration +* Scheduled auto update +* Preserve wireguard on firmware upgrade +* Preserve wireguard configuration on firmeware upgrade + +# Download and install WireGuard on Ubiquiti edge devices This script will reference [WireGuard/wireguard-vyatta-ubnt](https://github.com/WireGuard/wireguard-vyatta-ubnt) 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 +curl -L --silent https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/get_wireguard.sh -o /config/scripts/get_wireguard.sh && chmod +x /config/scripts/get_wireguard.sh ``` ***Note:*** _Best practice is to save scripts into `/config/scripts` directory._ From d011b11d6a27afa0fad988d91046699cc4add071 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Fri, 5 Feb 2021 11:07:53 +0100 Subject: [PATCH 2/4] Use sudo for download --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f265c22..d1027d1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This script installs and maintaince the wireguard vpn solution on a ubiquiti rou This script will reference [WireGuard/wireguard-vyatta-ubnt](https://github.com/WireGuard/wireguard-vyatta-ubnt) 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. ``` -curl -L --silent https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/get_wireguard.sh -o /config/scripts/get_wireguard.sh && chmod +x /config/scripts/get_wireguard.sh +sudo curl -L --silent https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/get_wireguard.sh -o /config/scripts/get_wireguard.sh && sudo chmod +x /config/scripts/get_wireguard.sh ``` ***Note:*** _Best practice is to save scripts into `/config/scripts` directory._ From b3670e837ccd9d61ef9112c18dd5955db3a112f9 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Sun, 21 Feb 2021 12:26:56 +0100 Subject: [PATCH 3/4] Revert single line install --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d1027d1..ed22326 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This script installs and maintaince the wireguard vpn solution on a ubiquiti rou *Features* -* Single line install +* Simple installation * Automatically detect used hardware * Proper upgrade process preserving configuration * Scheduled auto update @@ -15,10 +15,12 @@ This script installs and maintaince the wireguard vpn solution on a ubiquiti rou # Download and install WireGuard on Ubiquiti edge devices -This script will reference [WireGuard/wireguard-vyatta-ubnt](https://github.com/WireGuard/wireguard-vyatta-ubnt) 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. +This script will reference [WireGuard/wireguard-vyatta-ubnt](https://github.com/WireGuard/wireguard-vyatta-ubnt) 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 as root. ``` -sudo curl -L --silent https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/get_wireguard.sh -o /config/scripts/get_wireguard.sh && sudo chmod +x /config/scripts/get_wireguard.sh +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._ From 604bb8190cbfac2d31aca18067e5da14da9e2033 Mon Sep 17 00:00:00 2001 From: Harald Leithner Date: Mon, 24 May 2021 16:39:07 +0200 Subject: [PATCH 4/4] Add sudo to commands USG needs root to download files to /config/scripts folder --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ed22326..dbc8138 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,12 @@ This script installs and maintaince the wireguard vpn solution on a ubiquiti rou # Download and install WireGuard on Ubiquiti edge devices -This script will reference [WireGuard/wireguard-vyatta-ubnt](https://github.com/WireGuard/wireguard-vyatta-ubnt) 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 as root. +This script will reference [WireGuard/wireguard-vyatta-ubnt](https://github.com/WireGuard/wireguard-vyatta-ubnt) 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 +sudo curl -LO --silent https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/get_wireguard.sh +sudo chmod +x get_wireguard.sh ``` ***Note:*** _Best practice is to save scripts into `/config/scripts` directory._ @@ -30,13 +30,13 @@ chmod +x get_wireguard.sh To download and install the latest release of WireGuard, run the following command. ``` -./get_wireguard.sh +sudo ./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 +sudo ./get_wireguard.sh 0.0.20190913-1 ``` ## Log