|
@@ -1748,13 +1748,17 @@ function configure_avahi {
|
1748
|
1748
|
echo '</service>' >> /etc/avahi/services/irc.service
|
1749
|
1749
|
echo '</service-group>' >> /etc/avahi/services/irc.service
|
1750
|
1750
|
|
1751
|
|
- systemctl restart avahi-daemon
|
|
1751
|
+ # keep the daemon running
|
|
1752
|
+ echo '' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
|
1753
|
+ echo '# keep avahi daemon running' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
|
1754
|
+ echo 'AVAHI_RUNNING=$(pgrep avahi-daemon > /dev/null && echo Running)' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
|
1755
|
+ echo 'if [ ! $AVAHI_RUNNING ]; then' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
|
1756
|
+ echo ' systemctl start avahi-daemon' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
|
1757
|
+ echo ' echo -n $CURRENT_DATE >> $LOGFILE' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
|
1758
|
+ echo ' echo " Avahi daemon restarted" >> $LOGFILE' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
|
1759
|
+ echo 'fi' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
1752
|
1760
|
|
1753
|
|
- # this is a blatant hack, but I couldn't find a better way of mitigating the problem
|
1754
|
|
- # of avahi-daemon stopping after a few minutes
|
1755
|
|
- if ! grep -q "avahi-daemon" /etc/crontab; then
|
1756
|
|
- echo '* * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab
|
1757
|
|
- fi
|
|
1761
|
+ systemctl restart avahi-daemon
|
1758
|
1762
|
|
1759
|
1763
|
echo 'configure_avahi' >> $COMPLETION_FILE
|
1760
|
1764
|
}
|
|
@@ -1884,9 +1888,6 @@ function mesh_batman_bridge {
|
1884
|
1888
|
echo ' sed -i "s|use-ipv4=.*|use-ipv4=yes|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
1885
|
1889
|
echo ' sed -i "s|use-ipv6=.*|use-ipv6=no|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
1886
|
1890
|
echo ' sed -i "s|hosts:.*|hosts: files mdns4_minimal dns mdns4 mdns|g" /etc/nsswitch.conf' >> $batman_script
|
1887
|
|
- echo ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $batman_script
|
1888
|
|
- echo " echo '* *\t* * *\troot\tsystemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $batman_script
|
1889
|
|
- echo ' fi' >> $batman_script
|
1890
|
1891
|
echo 'fi' >> $batman_script
|
1891
|
1892
|
echo '' >> $batman_script
|
1892
|
1893
|
echo '# Mesh definition' >> $batman_script
|
|
@@ -10328,6 +10329,7 @@ search_for_attached_usb_drive
|
10328
|
10329
|
regenerate_ssh_keys
|
10329
|
10330
|
create_upgrade_script
|
10330
|
10331
|
install_zeronet
|
|
10332
|
+install_watchdog_script
|
10331
|
10333
|
configure_avahi
|
10332
|
10334
|
install_atheros_wifi
|
10333
|
10335
|
configure_firewall_for_cjdns
|
|
@@ -10338,7 +10340,6 @@ mesh_batman_bridge
|
10338
|
10340
|
configure_firewall_for_babel
|
10339
|
10341
|
mesh_babel
|
10340
|
10342
|
route_outgoing_traffic_through_tor
|
10341
|
|
-install_watchdog_script
|
10342
|
10343
|
configure_email
|
10343
|
10344
|
create_procmail
|
10344
|
10345
|
spam_filtering
|