Skip to content

Commit

Permalink
fix(setup): use the system D-Bus in distrobox
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Nov 5, 2024
1 parent a9a9efe commit 98dab80
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion setup-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,19 @@ $SUDO mkdir -p /usr/share/agama/products.d
$SUDO cp -f $MYDIR/products.d/*.yaml /usr/share/agama/products.d

# - Make sure NetworkManager is running
$SUDO systemctl start NetworkManager
if [ -n "${DISTROBOX_ENTER_PATH:-}" ]; then
AGAMA_WEB_SERVER_SVC="/usr/lib/systemd/system/agama-web-server.service"
grep -q DBUS_SYSTEM_BUS_ADDRESS $AGAMA_WEB_SERVER_SVC || $SUDO sed -i \
-e '/\[Service\]/a Environment="DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/host/run/dbus/system_bus_socket"' \
$AGAMA_WEB_SERVER_SVC

AGAMA_SVC="/usr/lib/systemd/system/agama.service"
grep -q DBUS_SYSTEM_BUS_ADDRESS $AGAMA_SVC || $SUDO sed -i \
-e '/\[Service\]/a Environment="DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/host/run/dbus/system_bus_socket"' \
$AGAMA_SVC
else
$SUDO systemctl start NetworkManager
fi

# systemd reload and start of service
(
Expand Down

0 comments on commit 98dab80

Please sign in to comment.