Use IPv4 address for scuttlebot
This commit is contained in:
parent
588c58799f
commit
f09b6732ab
|
@ -96,8 +96,8 @@ if [ -e /etc/default/batctl ]; then
|
||||||
. /etc/default/batctl
|
. /etc/default/batctl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function get_ipv6_bat0 {
|
function get_ipv4_wlan {
|
||||||
echo $(ip -o -f inet6 addr show dev "bat0" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}')
|
echo $(ip -o -f inet addr show dev "$IFACE" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}')
|
||||||
}
|
}
|
||||||
|
|
||||||
function mesh_hotspot_ip_address {
|
function mesh_hotspot_ip_address {
|
||||||
|
@ -407,8 +407,7 @@ function start {
|
||||||
systemctl restart avahi-daemon
|
systemctl restart avahi-daemon
|
||||||
|
|
||||||
if [ -f /etc/scuttlebot/.ssb/config ]; then
|
if [ -f /etc/scuttlebot/.ssb/config ]; then
|
||||||
ipv6addr=$(get_ipv6_bat0)
|
sed -i "s|\"host\": .*|\"host\": \"$(get_ipv4_wlan)\",|g" /etc/scuttlebot/.ssb/config
|
||||||
sed -i "s|\"host\": .*|\"host\": \"${ipv6addr}\",|g" /etc/scuttlebot/.ssb/config
|
|
||||||
systemctl restart scuttlebot
|
systemctl restart scuttlebot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue