| # Copyright 2018 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| description "CrosDns daemon for /etc/hosts modifications" |
| author "chromium-os-dev@chromium.org" |
| |
| # "-100" is the default OOM score for ChromeOS daemons that can recover. |
| oom score -100 |
| |
| # Starts the crosdns daemon which provides a service for making |
| # modifications to the /etc/hosts file. |
| start on starting vm_concierge |
| stop on stopped vm_concierge |
| respawn |
| |
| pre-start script |
| mount --no-canonicalize -o bind /run/crosdns/ /etc/hosts.d |
| end script |
| |
| post-stop script |
| umount --no-canonicalize --lazy /etc/hosts.d |
| end script |
| |
| script |
| exec minijail0 --config /usr/share/minijail/crosdns.conf \ |
| -- /usr/sbin/crosdns |
| end script |