Skip to content

Instantly share code, notes, and snippets.

@fuero
fuero / refresh-wirehub-config.sh
Created January 23, 2024 15:42
Refresh config from wirehub
#!/bin/bash
set -euo pipefail
IF=<if>
URL="https://wirehub.org/<user>/n/<net>/device/<id>/download?invite_code=<code>"
TMPFILE="$(mktemp)"
SPLITDIR="$(mktemp -d)"
DEST=/etc/wireguard/"$IF".conf
cleanup() {
rm -f "${TMPFILE}"

Keybase proof

I hereby claim:

  • I am fuero on github.
  • I am fuero (https://keybase.io/fuero) on keybase.
  • I have a public key whose fingerprint is BEC2 77FC 9E38 99C4 3BA7 2B88 85FE 99F1 5C3E E7CF

To claim this, I am signing this object: