mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
- The privileged service will stop by itself if left idle for 5 minutes. However, if someone is viewing a reloading page such as during manual software update, the privileged service is never idle. - When freedombox package is updated to a newer version, the old version of privileged daemon could run for a long time but newer version of freedombox service might be running by then. This would cause protocol mismatch problems (unless backwards compatibility is provided which is unnecessarily hard). - Adding PartOf=.socket in .service file means that if .socket unit is stopped or restarted, the .service unit will be stopped or restarted too. We still don't want the dh_installsystemd script to be starting the .service unit, so this is ideal. Tests: - During fresh install of freedombox package, freedombox-privilged.socket is started but freedombox-privileged.service is not. It is started due to socket activation (as seen in journal logs of privileged daemon). - During removal of freedombox package, .service is stopped when .socket unit is stopped. - During reinstall of freedombox package, .service is restarted when .socket unit is restarted. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
25 lines
619 B
Desktop File
25 lines
619 B
Desktop File
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
[Unit]
|
|
Description=FreedomBox Privileged Service
|
|
Documentation=https://wiki.debian.org/FreedomBox/
|
|
# Don't hit the start rate limiting.
|
|
StartLimitIntervalSec=0
|
|
# Stop/restart along with .socket unit (invoked from dpkg scripts).
|
|
PartOf=freedombox-privileged.socket
|
|
|
|
[Service]
|
|
Type=notify
|
|
ExecStart=/usr/lib/freedombox/freedombox-privileged
|
|
TimeoutSec=300s
|
|
User=root
|
|
Group=root
|
|
NotifyAccess=main
|
|
# Uploaded files in /var/tmp/ are shared with FreedomBox web service.
|
|
#PrivateTmp=yes
|
|
Restart=on-failure
|
|
# Don't restart too fast
|
|
RestartSec=1
|
|
RestartSteps=3
|
|
RestartMaxDelaySec=5
|