blob: 6c7883aa880e14c6e1c1a6f74254a0f9eed02b27 [file] [log] [blame]
# 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 "Modem firmware updater daemon"
author ""
start on starting system-services
stop on stopping system-services
# Set to true to turn on debug mode on startup.
env DEBUG_MODE="false"
pre-start script
# The journal goes in here.
mkdir -p /var/cache/modemfwd
chown modem:modem /var/cache/modemfwd
# modemfwd will look in here for a config file named disable_auto_update.
# If this file is present and contains "1", then auto update will be
# disabled.
mkdir -p /var/lib/modemfwd
chown modem:modem /var/lib/modemfwd
# Logs from helper tool runs will be stored here.
mkdir -p /var/log/modemfwd
chown modem:modem /var/log/modemfwd
end script
# Override logging level if sticky flag exists.
if [ -f /var/cache/modem-utilities/log_modemfwd_debug ]; then
# Default helper directory is /opt/google/modemfwd-helpers and if the
# firmware directory isn't specified we load from the cellular component.
exec minijail0 -u modem -g modem -G -n /usr/bin/modemfwd \
--firmware_directory=/opt/google/modemfwd-firmware \
end script