privileged: Add /bin file for privileged daemon

- So that it can be invoked easily from the command line and systemd service.

Tests:

- make install creates /usr/bin/freedombox-privileged daemon which can be run as
  root.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
Sunil Mohan Adapa 2025-06-25 13:14:46 -07:00 committed by Joseph Nuthalapati
parent c47a856e3e
commit a6089664eb
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35
3 changed files with 8 additions and 0 deletions

View File

@ -98,6 +98,7 @@ install:
rm -f $(DESTDIR)$${lib_dir}/plinth*.dist-info/COPYING.md && \
rm -f $(DESTDIR)$${lib_dir}/plinth*.dist-info/direct_url.json && \
$(INSTALL) -D -t $(BIN_DIR) bin/plinth
$(INSTALL) -D -t $(BIN_DIR) bin/freedombox-privileged
# Actions
$(INSTALL) -D -t $(DESTDIR)/usr/share/plinth/actions actions/actions

6
bin/freedombox-privileged Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/python3
# SPDX-License-Identifier: AGPL-3.0-or-later
import plinth.privileged_daemon
plinth.privileged_daemon.main()

View File

@ -103,6 +103,7 @@ build-backend = "setuptools.build_meta"
[project.scripts]
plinth = "plinth.__main__:main"
freedombox-privileged = "plinth.privileged_daemon:main"
[tool.setuptools.dynamic]
version = {attr = "plinth.__version__"}