| # Copyright 2018 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 fingerprint study webserver" |
| author "chromium-os-dev@chromium.org" |
| |
| start on started system-services |
| stop on stopping system-services |
| respawn |
| respawn limit 3 10 # if the job respawns 3 times in 10 seconds, stop trying. |
| |
| # Study parameters |
| env FINGER_COUNT=2 |
| env ENROLLMENT_COUNT=20 |
| env VERIFICATION_COUNT=15 |
| |
| env LOG_DIR=/var/log/fingerprints |
| env PICTURE_DIR=/var/lib/fingers |
| env GNUPGHOME=/var/lib/fpstudygnupg |
| |
| pre-start script |
| mkdir -m 755 -p "${LOG_DIR}" |
| mkdir -m 700 -p "${PICTURE_DIR}" |
| mkdir -m 700 -p "${GNUPGHOME}" |
| end script |
| |
| exec /opt/google/fingerprint_study/study_serve \ |
| --finger_count=${FINGER_COUNT} \ |
| --enrollment_count=${ENROLLMENT_COUNT} \ |
| --verification_count=${VERIFICATION_COUNT} \ |
| --log_dir=${LOG_DIR} \ |
| --picture_dir=${PICTURE_DIR} \ |
| --syslog \ |
| >${LOG_DIR}/server.out 2>&1 |