| # Copyright 2014 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 "Brillo Buffet Service" |
| author "chromium-os-dev@chromium.org" |
| start on starting system-services |
| stop on stopping system-services |
| env BUFFET_TEST_DEFINITIONS_PATH= |
| mkdir -m 0755 -p /var/lib/buffet |
| chown -R buffet:buffet /var/lib/buffet |
| # Minijail actually forks off our desired process. |
| exec minijail0 -i -g buffet -u buffet /usr/bin/buffet \ |
| --v="${BUFFET_LOG_LEVEL}" \ |
| --config_path="${BUFFET_CONFIG_PATH}" \ |
| --state_path="${BUFFET_STATE_PATH}" \ |
| --test_definitions_path="${BUFFET_TEST_DEFINITIONS_PATH}" \ |
| --enable_xmpp="${BUFFET_ENABLE_XMPP}" |
| # Wait for daemon to claim its D-Bus name before transitioning to started. |
| post-start exec gdbus wait --system --timeout 30 org.chromium.Buffet |