diff --git a/cmd/mesh/main.go b/cmd/mesh/main.go
index 008e0245..ca79e91f 100644
--- a/cmd/mesh/main.go
+++ b/cmd/mesh/main.go
@@ -294,10 +294,10 @@ func run(args yggArgs, ctx context.Context) {
return
}
//override httpaddress and wwwroot parameters in cfg
- if len(args.httpaddress) > 0 {
+ if len(cfg.HttpAddress) == 0 {
cfg.HttpAddress = args.httpaddress
}
- if len(args.wwwroot) > 0 {
+ if len(cfg.WwwRoot) == 0 {
cfg.WwwRoot = args.wwwroot
}
diff --git a/contrib/deb/generate-gui.sh b/contrib/deb/generate-gui.sh
index f87a7e91..a262dbfd 100755
--- a/contrib/deb/generate-gui.sh
+++ b/contrib/deb/generate-gui.sh
@@ -57,7 +57,7 @@ cat > /tmp/$PKGNAME/usr/share/applications/riv.desktop << EOF
Name=RiV mesh
GenericName=Mesh network
Comment=RiV-mesh is an early-stage implementation of a fully end-to-end encrypted IPv6 network
-Exec=sh -c "/usr/bin/mesh-ui /usr/share/riv/ui/index.html"
+Exec=sh -c "/usr/bin/mesh-ui http://localhost:19019"
Terminal=false
Type=Application
Icon=riv
diff --git a/contrib/macos/create-pkg-gui.sh b/contrib/macos/create-pkg-gui.sh
index df6181f7..10be6cef 100644
--- a/contrib/macos/create-pkg-gui.sh
+++ b/contrib/macos/create-pkg-gui.sh
@@ -54,7 +54,7 @@ cp contrib/macos/mesh.plist pkgbuild/root/Library/LaunchDaemons
cat > pkgbuild/root/Applications/RiV-mesh.app/Contents/MacOS/open-mesh-ui << EOF
#!/usr/bin/env bash
-exec /Applications/RiV-mesh.app/Contents/MacOS/mesh-ui /Applications/RiV-mesh.app/Contents/Resources/ui/index.html 1>/tmp/mesh-ui.stdout.log 2>/tmp/mesh-ui.stderr.log
+exec /Applications/RiV-mesh.app/Contents/MacOS/mesh-ui http://localhost:19019 1>/tmp/mesh-ui.stdout.log 2>/tmp/mesh-ui.stderr.log
EOF
# Create the postinstall script
diff --git a/contrib/macos/mesh.plist b/contrib/macos/mesh.plist
index fb9bb01d..86461721 100644
--- a/contrib/macos/mesh.plist
+++ b/contrib/macos/mesh.plist
@@ -9,6 +9,12 @@
/Applications/RiV-mesh.app/Contents/MacOS/mesh
-useconffile
/etc/mesh.conf
+ -logto
+ /var/log/mesh.log
+ -httpaddress
+ http://localhost:19019
+ -wwwroot
+ /Applications/RiV-mesh.app/Contents/Resources/ui
KeepAlive
diff --git a/contrib/msi/build-msi-gui.sh b/contrib/msi/build-msi-gui.sh
index 1ff27896..c7595aa7 100644
--- a/contrib/msi/build-msi-gui.sh
+++ b/contrib/msi/build-msi-gui.sh
@@ -220,7 +220,7 @@ cat > wix.xml << EOF
Name="Mesh"
Start="auto"
Type="ownProcess"
- Arguments='-useconffile "%ALLUSERSPROFILE%\\RiV-mesh\\mesh.conf" -logto "%ALLUSERSPROFILE%\\RiV-mesh\\mesh.log"'
+ Arguments='-useconffile "%ALLUSERSPROFILE%\\RiV-mesh\\mesh.conf" -logto "%ALLUSERSPROFILE%\\RiV-mesh\\mesh.log" -httpaddress "http://localhost:19019" -wwwroot "[MeshInstallFolder]\\RiV-mesh\\ui"'
Vital="yes" />
wix.xml << EOF
@@ -325,7 +325,7 @@ cat > wix.xml << EOF
Description="RiV-mesh is IoT E2E encrypted network"
Directory="DesktopFolder"
Target="[MeshInstallFolder]mesh-ui.exe"
- Arguments="ui\index.html"
+ Arguments="http://localhost:19019"
WorkingDirectory="MeshInstallFolder"/>
wix.xml << EOF
Key="Software\Microsoft\Windows\CurrentVersion\Run"
Name="RiV-mesh client"
Type="string"
- Value='"[MeshInstallFolder]mesh-ui.exe" "[MeshInstallFolder]ui\index.html"' />
+ Value='"[MeshInstallFolder]mesh-ui.exe" "http://localhost:19019"' />
ASSISTANCE_START_VIA_REGISTRY
diff --git a/contrib/systemd/mesh.service b/contrib/systemd/mesh.service
index 6cf5962f..ea58cf14 100644
--- a/contrib/systemd/mesh.service
+++ b/contrib/systemd/mesh.service
@@ -12,7 +12,7 @@ ProtectSystem=true
SyslogIdentifier=mesh
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE
ExecStartPre=+-/sbin/modprobe tun
-ExecStart=/usr/bin/mesh -useconffile /etc/mesh.conf
+ExecStart=/usr/bin/mesh -useconffile /etc/mesh.conf -logto /var/log/mesh.log -httpaddress "http://localhost:19019" -wwwroot "/usr/share/riv"
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
TimeoutStopSec=5