Skip to content
Snippets Groups Projects
Commit f09b6732 authored by Bob Mottram's avatar Bob Mottram
Browse files

Use IPv4 address for scuttlebot

parent 588c5879
No related branches found
No related tags found
No related merge requests found
......@@ -96,8 +96,8 @@ 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 get_ipv4_wlan {
echo $(ip -o -f inet addr show dev "$IFACE" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}')
}
function mesh_hotspot_ip_address {
......@@ -407,8 +407,7 @@ 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
sed -i "s|\"host\": .*|\"host\": \"$(get_ipv4_wlan)\",|g" /etc/scuttlebot/.ssb/config
systemctl restart scuttlebot
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment