blob: bf71e149d3e047ec51986ab59821d0fd6e671d2c [file] [log] [blame]
# Copyright (c) 2011 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 "Start the Chaps daemon (chapsd)"
author "chromium-os-dev@chromium.org"
# Starts the Chaps daemon, which provides TPM-backed cryptographic services.
start on started tcsd and started boot-services
stop on stopping boot-services
respawn
script
VERBOSE=""
if [ -f /home/chronos/.chaps_debug_2 ]; then
VERBOSE="--v=2"
rm /home/chronos/.chaps_debug_2
elif [ -f /home/chronos/.chaps_debug_1 ]; then
VERBOSE="--v=1"
rm /home/chronos/.chaps_debug_1
fi
mkdir -p /var/lib/chaps
chown chaps:chronos-access /var/lib/chaps
exec chapsd ${VERBOSE} --auto_load_system_token
end script