Skip to content

Commit

Permalink
Always do automatic provisioning as a system service
Browse files Browse the repository at this point in the history
In eos-kolibri, the KOLIBRI_APP_AUTOMATIC_PROVISION environment variable
is set for desktop users, but not for the kolibri-daemon system service.
As a result, the daemon application never knows to do automatic
provisioning. To work around this, if kolibri-daemon is running as a
system service we will force automatic provisioning to happen.
  • Loading branch information
dylanmccall committed May 23, 2024
1 parent d0f1617 commit f3978b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/kolibri_daemon/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,12 @@ def do_startup(self):
if self.use_system_bus:
Gio.bus_get(Gio.BusType.SYSTEM, None, self.__system_bus_on_get)

if APP_AUTOMATIC_PROVISION:
# If kolibri-daemon is running as a system service, start automatic
# provisioning regardless of the value of APP_AUTOMATIC_PROVISION. This
# works around an issue in eos-kolibri where that environment variable
# is unset for the Kolibri system service.
# FIXME: Remove the special case once the eos-kolibri issue is resolved.
if APP_AUTOMATIC_PROVISION or self.use_system_bus:
self.__kolibri_service.automatic_provision()

Gio.Application.do_startup(self)
Expand Down

0 comments on commit f3978b8

Please sign in to comment.