Commit cf9b9a57 authored by Joanne Hugé's avatar Joanne Hugé

playbook/ors: run re6st without interface option in Lille office

parent 8ebb2355
......@@ -2,10 +2,14 @@
IFACE="$(ip route | grep default | sed 's/.*dev \(\w*\)\( .*$\|$\)/\1/g')"
CONF="/etc/re6stnet/re6stnet.conf"
sed -i '/^interface/d' $CONF
echo "interface $IFACE" >> $CONF
# Don't run re6st with interface option at Lille Office
if ping6 -q -c2 -w3 fe80::20d:b9ff:fe3f:9055%$IFACE; then
systemctl stop re6stnet;
elif ! ps -ax -o cmd | grep babeld | grep -q $IFACE; then
if ps -ax -o cmd | grep babeld | grep -q $IFACE; then
systemctl restart re6stnet;
fi
else
echo "interface $IFACE" >> $CONF
if ! ps -ax -o cmd | grep babeld | grep -q $IFACE; then
systemctl restart re6stnet;
fi
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment