diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index ca975fe6..52198a60 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -795,6 +795,7 @@ function initialise_scuttlebot_pub { echo '{' > /etc/scuttlebot/.ssb/config echo " \"host\": \"${HOSTNAME}\"," >> /etc/scuttlebot/.ssb/config echo " \"port\": ${SCUTTLEBOT_PORT}," >> /etc/scuttlebot/.ssb/config + echo ' "allowPrivate": true,' >> /etc/scuttlebot/.ssb/config echo ' "timeout": 30000,' >> /etc/scuttlebot/.ssb/config echo ' "pub": true,' >> /etc/scuttlebot/.ssb/config echo ' "local": true,' >> /etc/scuttlebot/.ssb/config diff --git a/src/freedombone-mesh-batman b/src/freedombone-mesh-batman index 592cc87d..a64422eb 100755 --- a/src/freedombone-mesh-batman +++ b/src/freedombone-mesh-batman @@ -96,6 +96,10 @@ if [ -e /etc/default/batctl ]; then . /etc/default/batctl fi +function get_ipv6_bat0 { + echo $(ip -o -f inet6 addr show dev "bat0" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}') +} + function mesh_hotspot_ip_address { echo $(ip -o -f inet addr show dev "$BRIDGE" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}') } @@ -402,6 +406,12 @@ function start { systemctl restart avahi-daemon + if [ -f /etc/scuttlebot/.ssb/config ]; then + ipv6addr=$(get_ipv6_bat0) + sed -i "s|\"host\": .*|\"host\": \"${ipv6addr}\",|g" /etc/scuttlebot/.ssb/config + systemctl restart scuttlebot + fi + verify }