blob: bf10370a47bb617a92616cf1601c21b4ffe27d88 [file] [log] [blame] [edit]
# Copyright 2020 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Chrome OS Federated Computation service"
author "chromium-os-dev@chromium.org"
# This daemon is started by D-Bus service activation configured in
# federated/dbus/org.chromium.Federated.service.
stop on stopping system-services
# Score -100 for CrOS daemons that can recover.
oom score -100
# Let the process crash if it grows too much. "as" for "address space".
# TODO(b/239623649): 100MB is way too small for the real libfcp.so. Remove this
# limit for the time being.
# limit as 100000000 unlimited
expect fork
# The variable controls the verbosity of DVLOGs, which are compiled only in
# debug builds and are absent in production. The values of --vmodule are
# controlled by the logging system in the C++ code, which ignores invalid
# values.
import VMODULE_ARG
env VMODULE_ARG=
pre-start script
# Check if system-services is still running before starting federated-service.
# This is to prevent new dbus-activated instances from getting started once
# the system is beginning to shut down.
if ! initctl status system-services | grep -q running; then
stop
exit 0
fi
end script
exec minijail0 --config /usr/share/minijail/federated-service.conf \
-S /usr/share/policy/federated_service-seccomp.policy \
-- /usr/bin/federated_service \
--vmodule="${VMODULE_ARG}"
# Wait for daemon to claim its D-Bus name before transitioning to started.
post-start exec minijail0 -u federated-service -g federated-service \
/usr/bin/gdbus wait --system --timeout 15 org.chromium.Federated