| # 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 "ejcaruso@chromium.org" |
| |
| start on starting system-services |
| stop on stopping system-services |
| |
| # Set to true to turn on debug mode on startup. |
| env DEBUG_MODE="false" |
| import DEBUG_MODE |
| |
| 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 |
| |
| # 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 \ |
| --debug_mode="${DEBUG_MODE}" |