Skip to content

Instantly share code, notes, and snippets.

@simora
Last active October 16, 2019 21:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simora/44f5adaacc32951a084cf2432e4291c9 to your computer and use it in GitHub Desktop.
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
#!/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