| # Copyright 2015 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 "Brillo WebServer Daemon" |
| author "chromium-os-dev@chromium.org" |
| |
| start on starting system-services |
| stop on stopping system-services |
| respawn |
| |
| env WEBSERVD_LOG_LEVEL=0 |
| env WEBSERVD_DEBUG=false |
| env WEBSERVD_CONFIG_PATH= |
| |
| pre-start script |
| mkdir -m 0755 -p /var/log/webservd |
| chown webservd:webservd /var/log/webservd |
| end script |
| |
| # CAP_NET_RAW, CAP_NET_BIND_SERVICE |
| exec /sbin/minijail0 -c 0x2400 -u webservd -g webservd -G -n \ |
| -S /usr/share/filters/webservd-seccomp.policy \ |
| /usr/bin/webservd \ |
| --v="${WEBSERVD_LOG_LEVEL}" \ |
| --config_path="${WEBSERVD_CONFIG_PATH}" \ |
| --debug="${WEBSERVD_DEBUG}" \ |