blob: e603d751fa76c1bce63d5ab7b2e2801191ea73a5 [file] [log] [blame]
# Copyright 2020 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 "Daemon for handling Easy Unlock requests"
author ""
# This daemon is started by D-Bus service activation configured in
# org.chromium.EasyUnlock.service.
stop on stopping system-services
pre-start script
# Check if system-services is still running before starting easy-unlock.
# This is to prevent new dbus-activated instances from getting started once
# the system is beginning to shut down.
if ! initctl status system-services | grep -q running; then
exit 0
end script
exec minijail0 -u easy-unlock -g easy-unlock \
/opt/google/easy_unlock/easy_unlock --foreground
# Wait for daemon to claim its D-Bus name before transitioning to started.
post-start exec minijail0 -u easy-unlock -g easy-unlock /usr/bin/gdbus \
wait --system --timeout 15 org.chromium.EasyUnlock