blob: 7204f8a5448a35ea2b10fec3fd65d175085bce0d [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 "Start the fingerprint study webserver"
author "chromium-os-dev@chromium.org"
start on started system-services and stopped bio_crypto_init and started uinput
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=/mnt/stateful_partition/encrypted/fingers
env PYTHONPATH=/opt/google/fpstudy-virtualenv/lib/python3.7/site-packages
pre-start script
mkdir -m 755 -p ${LOG_DIR}
mkdir -m 700 -p ${PICTURE_DIR}
end script
exec python3.6 /opt/google/fpstudy-virtualenv/study/study_serve.py \
--finger_count=${FINGER_COUNT} \
--enrollment_count=${ENROLLMENT_COUNT} \
--verification_count=${VERIFICATION_COUNT} \
--log_dir=${LOG_DIR} \
--picture_dir=${PICTURE_DIR} \
>${LOG_DIR}/server.out 2>&1