Last active
October 16, 2019 21:09
-
-
Save simora/44f5adaacc32951a084cf2432e4291c9 to your computer and use it in GitHub Desktop.
Script to setup the Hardkernel Odroid HC1/2 and XU4 for Wireguard and Resilio-sync
This file contains hidden or 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
#!/bin/bash | |
function set_hostname() { | |
read -r -p 'Hostname: ' hostname | |
hostname $hostname | |
} | |
function install_pkgs() { | |
apt install -y vim libmnl-dev libelf-dev build-essential pkg-config git parted xfsprogs | |
apt-mark hold linux-odroid-5422 | |
} | |
function install_wireguard() { | |
git clone https://git.zx2c4.com/WireGuard | |
cd WireGuard/src | |
make ; make install | |
cd ../.. | |
systemctl enable wg-quick@wg0 | |
} | |
function install_sync() { | |
echo "deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" | tee /etc/apt/sources.list.d/resilio-sync.list | |
wget -qO - https://linux-packages.resilio.com/resilio-sync/key.asc | apt-key add - | |
apt update ; apt install resilio-sync | |
} | |
set_hostname | |
install_pkgs | |
install_wireguard | |
install_sync |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment