diff --git a/hosts/eve b/hosts/eve index 3e36cae..2d08545 100644 --- a/hosts/eve +++ b/hosts/eve @@ -1,5 +1,6 @@ Subnet = 02:1F:C8:16:F2:C0 Address = tinc.higgsboson.tk +Port = 666 -----BEGIN RSA PUBLIC KEY----- MIIBCgKCAQEAsGG/m+wr4Q5yRiJXojYu9bV1AgS7U7xUTe39RBAnuEEbpxgQ3SKP LLqf3ZBRkSeJ4xpevv66h7rR1/CIJ+xGbi2+m2QHLB66tGYUKQZIDa8TY9oss6lt diff --git a/tinc-up b/tinc-up index 2b115f6..3fe66b1 100755 --- a/tinc-up +++ b/tinc-up @@ -64,12 +64,23 @@ set_ip() { fi } +start_dhclient() { + local interface=$1 + if [[ "$OSTYPE" == "linux-gnu" ]]; then + dhclient -nw "$interface" + elif [[ "$OSTYPE" == "freebsd"* ]]; then + dhclient -b "$interface" + else + nohup setsid dhclient "$interface" >/dev/null 2>&1 + fi +} + start_dhcp() { local interface=$1 if has dhcpcd; then - dhcpcd "$interface" + dhcpcd -b -n "$interface" elif has dhclient; then - dhclient "$interface" + start_dhclient "$interface" elif [[ "$OSTYPE" == "darwin"* ]]; then # TODO untested ipconfig set "$interface" DHCP else