blob: dc7d40a7f022572ad7a25b43be40018b7aa831e3 [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Chrome OS Machine Learning service"
author "chromium-os-dev@chromium.org"
# This daemon is started by D-Bus service activation configured in
# ml/dbus/org.chromium.MachineLearning.service.
stop on stopping system-services
expect fork
pre-start script
mkdir -m 0755 -p /var/lib/ml_service/metrics
chown -R ml-service:ml-service /var/lib/ml_service
end script
exec minijail0 -e -i -n -p -r -v -l --uts -c 0 \
-S /usr/share/policy/ml_service-seccomp.policy \
-u ml-service -g ml-service -- /usr/bin/ml_service
# Wait for daemon to claim its D-Bus name before transitioning to started.
post-start exec minijail0 -u ml-service -g ml-service /usr/bin/gdbus \
wait --system --timeout 15 org.chromium.MachineLearning