| # 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 "Chrome OS Virtual File Provider" |
| author "chromium-os-dev@chromium.org" |
| |
| # This daemon is started by D-Bus service activation configured in |
| # org.chromium.VirtualFileProvider.service. |
| stop on stopping system-services |
| |
| pre-start script |
| # Check if system-services is still running before starting |
| # virtual-file-provider. 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 |
| stop |
| exit 0 |
| fi |
| end script |
| |
| exec /usr/bin/virtual-file-provider-jailed |
| |
| # Wait for daemon to claim its D-Bus name before transitioning to started. |
| post-start exec minijail0 -u virtual-file-provider -g virtual-file-provider \ |
| /usr/bin/gdbus wait --system --timeout 15 org.chromium.VirtualFileProvider |