Преглед на файлове

Get the local hostname first

Bob Mottram преди 6 години
родител
ревизия
50363c6c6a
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3
    3
      src/freedombone-utils-android

+ 3
- 3
src/freedombone-utils-android Целия файл

@@ -31,15 +31,15 @@ function android_update_apps {
31 31
         detect_installable_apps
32 32
     fi
33 33
 
34
+    local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
35
+    plinth_api="/var/www/${local_hostname}/htdocs/plinth/api/1"
36
+
34 37
     # Create a self-signed cert if needed
35 38
     # The FreedomBox app assumes a self-signed cert
36 39
     if [ ! -f "/etc/ssl/certs/${local_hostname}.crt" ]; then
37 40
         install_web_local_user_interface
38 41
     fi
39 42
 
40
-    local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
41
-    plinth_api="/var/www/${local_hostname}/htdocs/plinth/api/1"
42
-
43 43
     if [ ! -d "/var/www/${local_hostname}/htdocs/plinth/api" ]; then
44 44
         mkdir -p "/var/www/${local_hostname}/htdocs/plinth/api"
45 45
     fi