Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
function install_wireguard () {
VER=$(cat /opt/vyatta/etc/version | grep Version | grep -q 'v2.0' && echo '-v2.0' || echo '')
echo "Downloading Wireguard$VER ($BOARD-$RELEASE)..."
FILENAME="wireguard$VER-$BOARD-$RELEASE.deb"
DEB_URL="https://github.com/Lochnair/vyatta-wireguard/releases/download/$RELEASE/$FILENAME"
if (/usr/bin/curl -s -L -o /tmp/$FILENAME $DEB_URL); then
echo "Installing $FILENAME..."
dpkg -i /tmp/$FILENAME