blob: 0747ef56a9edbccb9dfd7da03a260875a290ad3f [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=
15
Alex Vakulenkof3d77e52014-04-15 11:36:32 -070016pre-start script
Anton Muhin860e6792014-11-22 05:11:16 +040017 mkdir -m 0755 -p /var/lib/buffet
18 chown -R buffet:buffet /var/lib/buffet
Alex Vakulenkof3d77e52014-04-15 11:36:32 -070019end script
20
Anton Muhinecfa00c2014-11-20 01:10:08 +040021# Minijail actually forks off our desired process.
22expect fork
23
Christopher Wiley357deca2015-02-07 18:29:32 -080024exec minijail0 -i -g buffet -u buffet /usr/bin/buffet \
25 --v="${BUFFET_LOG_LEVEL}" \
26 --config_path="${BUFFET_CONFIG_PATH}" \
27 --state_path="${BUFFET_STATE_PATH}"