broadcast the mesh routing protocol on avahi
This commit is contained in:
parent
9e2d2df552
commit
256e01647a
|
@ -260,16 +260,19 @@ function start {
|
|||
if grep -q "bmx6" $MESH_DEFAULT_PROTOCOL; then
|
||||
systemctl enable bmx6
|
||||
systemctl restart bmx6
|
||||
sed -i 's|<type>.*|<type>_bmx6._tcp</type>|g' /etc/avahi/services/routing.service
|
||||
fi
|
||||
|
||||
if grep -q "bmx7" $MESH_DEFAULT_PROTOCOL; then
|
||||
systemctl enable bmx7
|
||||
systemctl restart bmx7
|
||||
sed -i 's|<type>.*|<type>_bmx7._tcp</type>|g' /etc/avahi/services/routing.service
|
||||
fi
|
||||
|
||||
if grep -q "olsr" $MESH_DEFAULT_PROTOCOL; then
|
||||
systemctl enable olsr2
|
||||
systemctl restart olsr2
|
||||
sed -i 's|<type>.*|<type>_olsr2._tcp</type>|g' /etc/avahi/services/routing.service
|
||||
fi
|
||||
|
||||
systemctl restart avahi-daemon
|
||||
|
|
|
@ -111,13 +111,23 @@ function mesh_avahi {
|
|||
echo '<?xml version="1.0" standalone="no"?><!--*-nxml-*-->' > $rootdir/etc/avahi/services/ssh.service
|
||||
echo '<!DOCTYPE service-group SYSTEM "avahi-service.dtd">' >> $rootdir/etc/avahi/services/ssh.service
|
||||
echo '<service-group>' >> $rootdir/etc/avahi/services/ssh.service
|
||||
echo ' <name replace-wildcards="yes">%h SSH</name>' >> $rootdir/etc/avahi/services/ssh.service
|
||||
echo ' <name replace-wildcards="yes">%h ssh</name>' >> $rootdir/etc/avahi/services/ssh.service
|
||||
echo ' <service>' >> $rootdir/etc/avahi/services/ssh.service
|
||||
echo ' <type>_ssh._tcp</type>' >> $rootdir/etc/avahi/services/ssh.service
|
||||
echo " <port>$SSH_PORT</port>" >> $rootdir/etc/avahi/services/ssh.service
|
||||
echo ' </service>' >> $rootdir/etc/avahi/services/ssh.service
|
||||
echo '</service-group>' >> $rootdir/etc/avahi/services/ssh.service
|
||||
|
||||
# Add a mesh routing protocol service
|
||||
echo '<?xml version="1.0" standalone="no"?><!--*-nxml-*-->' > $rootdir/etc/avahi/services/routing.service
|
||||
echo '<!DOCTYPE service-group SYSTEM "avahi-service.dtd">' >> $rootdir/etc/avahi/services/routing.service
|
||||
echo '<service-group>' >> $rootdir/etc/avahi/services/routing.service
|
||||
echo ' <name replace-wildcards="yes">%h routing</name>' >> $rootdir/etc/avahi/services/routing.service
|
||||
echo ' <service>' >> $rootdir/etc/avahi/services/routing.service
|
||||
echo ' <type>_bmx6._tcp</type>' >> $rootdir/etc/avahi/services/routing.service
|
||||
echo ' </service>' >> $rootdir/etc/avahi/services/routing.service
|
||||
echo '</service-group>' >> $rootdir/etc/avahi/services/routing.service
|
||||
|
||||
# keep the daemon running
|
||||
WATCHDOG_SCRIPT_NAME="keepon"
|
||||
echo '' >> $rootdir/usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
|
|
Loading…
Reference in New Issue