blob: 1e27a53296cb6ab0f4afeaec6034bec7e9b622b6 [file] [log] [blame]
Chris Sosa5bac9492014-03-24 11:18:54 -07001# Copyright 2014 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5description "Brillo Buffet Service"
6author "chromium-os-dev@chromium.org"
7
8start on starting system-services
9stop on stopping system-services
10respawn
11
Christopher Wiley357deca2015-02-07 18:29:32 -080012env BUFFET_LOG_LEVEL=0
13env BUFFET_STATE_PATH=
14env BUFFET_CONFIG_PATH=
Christopher Wileyc39f4a32015-02-12 13:42:16 -080015env BUFFET_TEST_DEFINITIONS_PATH=
Christopher Wiley357deca2015-02-07 18:29:32 -080016
Alex Vakulenkof3d77e52014-04-15 11:36:32 -070017pre-start script
Anton Muhin860e6792014-11-22 05:11:16 +040018 mkdir -m 0755 -p /var/lib/buffet
19 chown -R buffet:buffet /var/lib/buffet
Alex Vakulenkof3d77e52014-04-15 11:36:32 -070020end script
21
Anton Muhinecfa00c2014-11-20 01:10:08 +040022# Minijail actually forks off our desired process.
23expect fork
24
Christopher Wiley357deca2015-02-07 18:29:32 -080025exec minijail0 -i -g buffet -u buffet /usr/bin/buffet \
26 --v="${BUFFET_LOG_LEVEL}" \
27 --config_path="${BUFFET_CONFIG_PATH}" \
Christopher Wileyc39f4a32015-02-12 13:42:16 -080028 --state_path="${BUFFET_STATE_PATH}" \
29 --test_definitions_path="${BUFFET_TEST_DEFINITIONS_PATH}"