From 0dc5f7ca2ca9cb7bf9d43c82093de4105ec6d4bc Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 10 Aug 2015 21:20:07 +0100 Subject: [PATCH] Fix crontab entries for restarting avahi-daemon --- src/freedombone | 2 +- src/freedombone-client | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/freedombone b/src/freedombone index b48e44dc..684f8743 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1705,7 +1705,7 @@ function configure_avahi { # this is a blatant hack, but I couldn't find a better way of mitigating the problem # of avahi-daemon stopping after a few minutes if ! grep -q "avahi-daemon" /etc/crontab; then - echo '1 * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab + echo '* *\t* * *\troot\tsystemctl restart avahi-daemon > /dev/null' >> /etc/crontab fi echo 'configure_avahi' >> $COMPLETION_FILE diff --git a/src/freedombone-client b/src/freedombone-client index eda701f2..e75c73e9 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -120,9 +120,9 @@ function mesh_babel { echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script echo ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $babel_script echo ' if [ -f /bin/systemctl ]; then' >> $babel_script - echo " echo '1 * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $babel_script + echo " echo '* *\t* * *\troot\tsystemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $babel_script echo ' else' >> $babel_script - echo " echo '1 * * * * root service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $babel_script + echo " echo '* *\t* * *\troot\tservice avahi-daemon restart > /dev/null' >> /etc/crontab" >> $babel_script echo ' fi' >> $babel_script echo ' fi' >> $babel_script echo ' if [ -f /bin/systemctl ]; then' >> $babel_script @@ -204,9 +204,9 @@ function mesh_batman { echo ' sed -i "s|hosts:.*|hosts: files mdns4_minimal dns mdns4 mdns|g" /etc/nsswitch.conf' >> $batman_script echo ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $batman_script echo ' if [ -f /bin/systemctl ]; then' >> $batman_script - echo " echo '1 * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $batman_script + echo " echo '* *\t* * *\troot\tsystemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $batman_script echo ' else' >> $batman_script - echo " echo '1 * * * * root service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $batman_script + echo " echo '* *\t* * *\troot\tservice avahi-daemon restart > /dev/null' >> /etc/crontab" >> $batman_script echo ' fi' >> $batman_script echo ' fi' >> $batman_script echo 'fi' >> $batman_script