瀏覽代碼

Reduce restart interval to one min

Bob Mottram 9 年之前
父節點
當前提交
e8c5b0d4e5
共有 2 個檔案被更改,包括 5 行新增5 行删除
  1. 1
    1
      src/freedombone
  2. 4
    4
      src/freedombone-client

+ 1
- 1
src/freedombone 查看文件

@@ -1702,7 +1702,7 @@ function configure_avahi {
1702 1702
   # this is a blatant hack, but I couldn't find a better way of mitigating the problem
1703 1703
   # of avahi-daemon stopping after a few minutes
1704 1704
   if ! grep -q "avahi-daemon" /etc/crontab; then
1705
-      echo '2 * * * *   root    systemctl restart avahi-daemon > /dev/null' >> /etc/crontab
1705
+      echo '1 * * * *   root    systemctl restart avahi-daemon > /dev/null' >> /etc/crontab
1706 1706
   fi
1707 1707
 
1708 1708
   echo 'configure_avahi' >> $COMPLETION_FILE

+ 4
- 4
src/freedombone-client 查看文件

@@ -120,9 +120,9 @@ function mesh_babel {
120 120
   echo '    sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
121 121
   echo '    if ! grep -q "avahi-daemon" /etc/crontab; then' >> $babel_script
122 122
   echo '        if [ -f /bin/systemctl ]; then' >> $babel_script
123
-  echo "            echo '2 *   * * *   root    systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $babel_script
123
+  echo "            echo '1 *   * * *   root    systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $babel_script
124 124
   echo '        else' >> $babel_script
125
-  echo "            echo '2 *   * * *   root    service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $babel_script
125
+  echo "            echo '1 *   * * *   root    service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $babel_script
126 126
   echo '        fi' >> $babel_script
127 127
   echo '    fi' >> $babel_script
128 128
   echo '    if [ -f /bin/systemctl ]; then' >> $babel_script
@@ -204,9 +204,9 @@ function mesh_batman {
204 204
   echo '    sed -i "s|hosts:.*|hosts:          files mdns4_minimal dns mdns4 mdns|g" /etc/nsswitch.conf' >> $batman_script
205 205
   echo '    if ! grep -q "avahi-daemon" /etc/crontab; then' >> $batman_script
206 206
   echo '        if [ -f /bin/systemctl ]; then' >> $batman_script
207
-  echo "            echo '2 *   * * *   root    systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $batman_script
207
+  echo "            echo '1 *   * * *   root    systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $batman_script
208 208
   echo '        else' >> $batman_script
209
-  echo "            echo '2 *   * * *   root    service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $batman_script
209
+  echo "            echo '1 *   * * *   root    service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $batman_script
210 210
   echo '        fi' >> $batman_script
211 211
   echo '    fi' >> $batman_script
212 212
   echo 'fi' >> $batman_script