mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
modem73 - Removed settings file before each run to prevent inconsistent or incorrect configuration for ETC
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 28 June 2026
|
# Date : 30 June 2026
|
||||||
# Purpose : Wrapper script for starting modem73 with PnP support
|
# Purpose : Wrapper script for starting modem73 with PnP support
|
||||||
#
|
#
|
||||||
# Preconditions:
|
# Preconditions:
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
# Postconditions:
|
# Postconditions:
|
||||||
# 1. modem73 started with sane defaults
|
# 1. modem73 started with sane defaults
|
||||||
|
|
||||||
MODEM73_CONF_FILE=${ET_HOME}/conf/template.d/modem73/settings.default
|
MODEM73_CONF_FILE="${HOME}/.config/modem73/settings"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $(basename $0) <command> <type>"
|
echo "usage: $(basename $0) <command> <type>"
|
||||||
@@ -77,6 +77,14 @@ start() {
|
|||||||
|
|
||||||
update_config () {
|
update_config () {
|
||||||
|
|
||||||
|
# The modem73 configuration file causes issues when using it in combination with
|
||||||
|
# command line arguments during manual runs. It is best to remove it before each
|
||||||
|
# run and drive the modem using only command line arguments.
|
||||||
|
if [[ -e "${MODEM73_CONF_FILE}" ]]; then
|
||||||
|
et-log "Removing previous configuration file: ${MODEM73_CONF_FILE}"
|
||||||
|
rm -v ${MODEM73_CONF_FILE}
|
||||||
|
fi
|
||||||
|
|
||||||
et-log "Attempting to start modem73 in mode: '${MODE}'"
|
et-log "Attempting to start modem73 in mode: '${MODE}'"
|
||||||
|
|
||||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||||
|
|||||||
Reference in New Issue
Block a user