Skip to content
Snippets Groups Projects
Commit 50363c6c authored by Bob Mottram's avatar Bob Mottram
Browse files

Get the local hostname first

parent 5f2aa9e5
No related branches found
No related tags found
No related merge requests found
...@@ -31,15 +31,15 @@ function android_update_apps { ...@@ -31,15 +31,15 @@ function android_update_apps {
detect_installable_apps detect_installable_apps
fi fi
local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
plinth_api="/var/www/${local_hostname}/htdocs/plinth/api/1"
# Create a self-signed cert if needed # Create a self-signed cert if needed
# The FreedomBox app assumes a self-signed cert # The FreedomBox app assumes a self-signed cert
if [ ! -f "/etc/ssl/certs/${local_hostname}.crt" ]; then if [ ! -f "/etc/ssl/certs/${local_hostname}.crt" ]; then
install_web_local_user_interface install_web_local_user_interface
fi fi
local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
plinth_api="/var/www/${local_hostname}/htdocs/plinth/api/1"
if [ ! -d "/var/www/${local_hostname}/htdocs/plinth/api" ]; then if [ ! -d "/var/www/${local_hostname}/htdocs/plinth/api" ]; then
mkdir -p "/var/www/${local_hostname}/htdocs/plinth/api" mkdir -p "/var/www/${local_hostname}/htdocs/plinth/api"
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment