ソースを参照

Configure avahi on regular client installs

Bob Mottram 8 年 前
コミット
1b72fc896d
共有1 個のファイルを変更した11 個の追加6 個の削除を含む
  1. 11
    6
      src/freedombone-client

+ 11
- 6
src/freedombone-client ファイルの表示

267
     fi
267
     fi
268
 }
268
 }
269
 
269
 
270
+function setup_avahi_client {
271
+    echo $'Configuring Avahi'
272
+    if [ ! -f /usr/bin/pacman ]; then
273
+        sudo apt-get -yq install avahi-utils avahi-autoipd avahi-dnsconfd
274
+    else
275
+        sudo pacman -S --noconfirm avahi nss-mdns
276
+        sudo sed -i 's|hosts:.*|hosts: files mdns_minimal [NOTFOUND=return] dns myhostname|g' /etc/nsswitch.conf
277
+    fi
278
+}
279
+
270
 while [[ $# > 1 ]]
280
 while [[ $# > 1 ]]
271
 do
281
 do
272
     key="$1"
282
     key="$1"
303
 done
313
 done
304
 
314
 
305
 echo $'Configuring client'
315
 echo $'Configuring client'
316
+setup_avahi_client
306
 setup_client_app
317
 setup_client_app
307
 refresh_gpg_keys
318
 refresh_gpg_keys
308
 configure_ssh_client
319
 configure_ssh_client
311
 remove_known_hosts_entries
322
 remove_known_hosts_entries
312
 if [[ $MESH_CLIENT_INSTALL == $'yes' || $MESH_CLIENT_INSTALL == $'y' || $MESH_CLIENT_INSTALL == $'on' ]]; then
323
 if [[ $MESH_CLIENT_INSTALL == $'yes' || $MESH_CLIENT_INSTALL == $'y' || $MESH_CLIENT_INSTALL == $'on' ]]; then
313
     echo $'Installing mesh packages'
324
     echo $'Installing mesh packages'
314
-    if [ ! -f /usr/bin/pacman ]; then
315
-        sudo apt-get -yq install avahi-utils avahi-autoipd avahi-dnsconfd
316
-    else
317
-        sudo pacman -S --noconfirm avahi nss-mdns
318
-        sudo sed -i 's|hosts:.*|hosts: files mdns_minimal [NOTFOUND=return] dns myhostname|g' /etc/nsswitch.conf
319
-    fi
320
     sudo ${PROJECT_NAME}-mesh-install -f tox_node
325
     sudo ${PROJECT_NAME}-mesh-install -f tox_node
321
     sudo ${PROJECT_NAME}-mesh-install -f toxic
326
     sudo ${PROJECT_NAME}-mesh-install -f toxic
322
     ${PROJECT_NAME}-mesh-install -f qtox
327
     ${PROJECT_NAME}-mesh-install -f qtox