mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
- Avoid duplicate log messages by not logging to console when running as systemd unit. - Retain normal logging when running on the terminal. Tests: - When running as systemd unit, output to stdin/stdout is captured in systemd journal and visible with 'sudo freedombox-logs'. - When running on terminal manually with 'sudo --user plinth ./run --develop' both log messages and stdout/stderr prints() are visible. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
27 lines
619 B
Desktop File
27 lines
619 B
Desktop File
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
[Unit]
|
|
Description=FreedomBox Service (Plinth)
|
|
Documentation=man:plinth(1)
|
|
After=network.target
|
|
StartLimitIntervalSec=0
|
|
# Uploaded files in /var/tmp/ are shared with FreedomBox privileged service.
|
|
JoinsNamespaceOf=freedombox-privileged.service
|
|
|
|
[Service]
|
|
Type=notify
|
|
ExecStart=/usr/bin/plinth
|
|
TimeoutSec=300s
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
User=plinth
|
|
Group=plinth
|
|
NotifyAccess=main
|
|
# Uploaded files in /var/tmp/ are shared with FreedomBox privileged service by
|
|
# joining namespaces.
|
|
PrivateTmp=yes
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|