blob: c5572953ac7c4d4adce9a2e61d40a881f822b67f [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
env LOG_DIR=/var/log/whining
pre-start script
mkdir -p "${LOG_DIR}"
chown -R moblab:moblab "${LOG_DIR}"
end script
script
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 5 mins (this script respawns)
sleep 300
echo "Updating wmatrix database ($(date))."
cd /whining
sudo -u moblab sh upd_moblab.sh
echo "Update completed."
done
end script