Selaa lähdekoodia

Try to ensure that avahi serices always remain visible on the LAN

Bob Mottram 7 vuotta sitten
vanhempi
commit
757313ee3a
1 muutettua tiedostoa jossa 8 lisäystä ja 0 poistoa
  1. 8
    0
      src/freedombone-utils-avahi

+ 8
- 0
src/freedombone-utils-avahi Näytä tiedosto

137
       echo 'fi';
137
       echo 'fi';
138
       echo '# End of avahi'; } >> "/usr/bin/$WATCHDOG_SCRIPT_NAME"
138
       echo '# End of avahi'; } >> "/usr/bin/$WATCHDOG_SCRIPT_NAME"
139
     chmod +x "/usr/bin/$WATCHDOG_SCRIPT_NAME"
139
     chmod +x "/usr/bin/$WATCHDOG_SCRIPT_NAME"
140
+
141
+    # This is a bit of a hack to ensure that avahi services get broadcast
142
+    # Without this some other systems may not be able to see the server
143
+    { echo '#!/bin/bash';
144
+      echo 'systemctl restart avahi-daemon'; } > /usr/bin/restartavahi
145
+    chmod +x /usr/bin/restartavahi
146
+
147
+    cron_add_mins 10 /usr/bin/restartavahi
140
 }
148
 }
141
 
149
 
142
 function install_avahi {
150
 function install_avahi {