blob: 95f53bd55658726a795cc4e10186dad1600f5131 [file] [log] [blame]
# Copyright 2016 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 "Import test results for whining/wmatrix on moblab"
author "chromium-os-dev@chromium.org"
start on (stopped whining_setup and started moblab-database-init)
respawn
normal exit TERM
env LOG_DIR=/var/log/whining
pre-start script
mkdir -p "${LOG_DIR}"
chown -R moblab:moblab "${LOG_DIR}"
end script
script
set -e
while true; do
mv "${LOG_DIR}/update.log" "${LOG_DIR}/update.log.old" || true
exec >> "${LOG_DIR}/update.log" 2>&1
# Update the wmatrix database every 60 seconds (this script respawns)
sleep 600
echo "Updating wmatrix database ($(date))."
cd /whining
sudo -u moblab sh upd_moblab.sh
echo "Update completed."
done
end script