From 757313ee3a4656edac276b9220dec86d5e927bd2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 27 May 2018 12:58:09 +0100 Subject: [PATCH] Try to ensure that avahi serices always remain visible on the LAN --- src/freedombone-utils-avahi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/freedombone-utils-avahi b/src/freedombone-utils-avahi index fcbeeae0..69660c93 100755 --- a/src/freedombone-utils-avahi +++ b/src/freedombone-utils-avahi @@ -137,6 +137,14 @@ function keep_avahi_running { echo 'fi'; echo '# End of avahi'; } >> "/usr/bin/$WATCHDOG_SCRIPT_NAME" chmod +x "/usr/bin/$WATCHDOG_SCRIPT_NAME" + + # This is a bit of a hack to ensure that avahi services get broadcast + # Without this some other systems may not be able to see the server + { echo '#!/bin/bash'; + echo 'systemctl restart avahi-daemon'; } > /usr/bin/restartavahi + chmod +x /usr/bin/restartavahi + + cron_add_mins 10 /usr/bin/restartavahi } function install_avahi {