Bob Mottram 6 лет назад
Родитель
Сommit
50363c6c6a
1 измененных файлов: 3 добавлений и 3 удалений
  1. 3
    3
      src/freedombone-utils-android

+ 3
- 3
src/freedombone-utils-android Просмотреть файл

31
         detect_installable_apps
31
         detect_installable_apps
32
     fi
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
     # Create a self-signed cert if needed
37
     # Create a self-signed cert if needed
35
     # The FreedomBox app assumes a self-signed cert
38
     # The FreedomBox app assumes a self-signed cert
36
     if [ ! -f "/etc/ssl/certs/${local_hostname}.crt" ]; then
39
     if [ ! -f "/etc/ssl/certs/${local_hostname}.crt" ]; then
37
         install_web_local_user_interface
40
         install_web_local_user_interface
38
     fi
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
     if [ ! -d "/var/www/${local_hostname}/htdocs/plinth/api" ]; then
43
     if [ ! -d "/var/www/${local_hostname}/htdocs/plinth/api" ]; then
44
         mkdir -p "/var/www/${local_hostname}/htdocs/plinth/api"
44
         mkdir -p "/var/www/${local_hostname}/htdocs/plinth/api"
45
     fi
45
     fi