Created
May 8, 2018 22:25
-
-
Save bse666/b6989824b4e7a1dc4824cf7f0d530304 to your computer and use it in GitHub Desktop.
tinc in jail
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/sh | |
# Jails in Freenas use a tun Device for each Restart. | |
# This script gets the actual Device and sets it in the tinc config | |
# Edit NETWORKNAME to match your's. | |
TUN_DEVICE="/dev/`ifconfig | grep tun | awk '{print $1}' | sed s/://g`" | |
sed -i .orig "s#Device.*#Device = $TUN_DEVICE#" /usr/local/etc/tinc/NETWORKNAME/tinc.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment