Add TARIFF-variables
This commit is contained in:
parent
ba556f02bd
commit
0285fed0a1
20
read_config
20
read_config
@ -145,14 +145,14 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
# Zone aus /etc/zone_nr auslesen
|
||||
#
|
||||
readonly ZONE_GROUP=1
|
||||
readonly ZONE=1
|
||||
readonly ZONE=2
|
||||
readonly CUST_BASE_DIR="${CUST_BASE_DIRS[$ZONE]}"
|
||||
assert_d CUST_BASE_DIR
|
||||
|
||||
readonly ETC_SYS_DIR="/etc"
|
||||
readonly ATB_SYS_DIR="/etc/atb"
|
||||
readonly DC_SYS_DIR="/etc/dc"
|
||||
readonly TARIFF_SYS_DIR="/etc/tariff"
|
||||
readonly TARIFF_SYS_DIR="/etc/psa_tariff"
|
||||
readonly OPKG_SYS_DIR="/etc/psa_update"
|
||||
readonly CONF_SYS_DIR="/etc/psa_config"
|
||||
readonly OPT_SYS_DIR="/opt"
|
||||
@ -180,6 +180,8 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
readonly SYSCTRL_INI="SystemControl.ini"
|
||||
readonly TARIFF_CURRENT="tariff.current"
|
||||
readonly DC="dc2c.hex"
|
||||
readonly TARIFF_SUMMER="summer_tariff.json"
|
||||
readonly TARIFF_WINTER="winter_tariff.json"
|
||||
|
||||
readonly DC_SYS_DC_FILE="${DC_SYS_DIR}/$DC"
|
||||
readonly ATBQT_ATB_SYS_BIN_FILE="${ATBAPP_SYS_DIR}/$ATBQT_BIN"
|
||||
@ -204,6 +206,8 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
readonly DC2C_SYS_CASH_JSON="${CONF_SYS_DIR}/DC2C_cash.json"
|
||||
readonly DC2C_SYS_CONF_JSON="${CONF_SYS_DIR}/DC2C_conf.json"
|
||||
readonly DC_PSA_DC_FILE="${DC_PSA_DIR}/$DC"
|
||||
readonly TARIFF_SYS_SUMMER="${TARIFF_SYS_DIR}${TARIFF_SUMMER}"
|
||||
readonly TARIFF_SYS_WINTER="${TARIFF_SYS_DIR}${TARIFF_WINTER}"
|
||||
|
||||
readonly ATBQT_ATB_PSA_INI_FILE="${ATB_PSA_DIR}/$ATBQT_INI"
|
||||
readonly ATBQT_APP_PSA_INI_FILE="${ATBAPP_PSA_DIR}/$ATBQT_INI"
|
||||
@ -319,17 +323,26 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
for i in {1..32}; do # up to 32 print-json-files
|
||||
local __f=${CONF_PSA_DIR}/DC2C_print$(printf "%02d" $i).json
|
||||
readonly DC2C_PRINT$(printf "%02d" $i)_JSON=$__f
|
||||
# local __g=$(eval echo '$'DC2C_PRINT$(printf "%02d" $i)_JSON)
|
||||
assert_f DC2C_PRINT$(printf "%02d" $i)_JSON
|
||||
DC2C_PRINT_JSON+=($__f)
|
||||
done
|
||||
|
||||
local TARIFF_FILES_JSON=()
|
||||
for i in {1..32}; do # up to 32 tariff-json-files
|
||||
local __f=${TARIFF_PSA_DIR}/tariff$(printf "%02d" $i).json
|
||||
readonly TARIFF$(printf "%02d" $i)_JSON=$__f
|
||||
assert_f TARIFF$(printf "%02d" $i)_JSON
|
||||
TARIFF_FILES_JSON+=($__f)
|
||||
done
|
||||
|
||||
readonly KNOWN_CONF_FILES=(${CUSTOMER_LOCATION}/update.conf \
|
||||
${DC2C_PRINT_JSON[@]##*${CUSTOMER_ID}/} \
|
||||
${DC2C_PSA_CONF_JSON##*${CUSTOMER_ID}/} \
|
||||
${DC2C_PSA_CASH_JSON##*${CUSTOMER_ID}/} \
|
||||
${DC2C_PSA_SERIAL_JSON##*${CUSTOMER_ID}/})
|
||||
|
||||
readonly KNOWN_TARIFF_FILES=(${TARIFF_FILES_JSON[@]##*${CUSTOMER_ID}/})
|
||||
|
||||
readonly KNOWN_INI_FILES=(${ATBAPP_PSA_INI_FILE##*${CUSTOMER_ID}/} \
|
||||
${ISMASMGRATB_PSA_INI_FILE##*${CUSTOMER_ID}/} \
|
||||
${ISMASMGRAPP_PSA_INI_FILE##*${CUSTOMER_ID}/} \
|
||||
@ -347,6 +360,7 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
|
||||
readonly KNOWN_FILES=(${KNOWN_CONF_FILES[@]} \
|
||||
${KNOWN_INI_FILES[@]} \
|
||||
${KNOWN_TARIFF_FILES[@]} \
|
||||
${DC_PSA_DC_FILE##*${CUSTOMER_ID}/} \
|
||||
${OPKG_CMDS_PSA_FILE##*${CUSTOMER_ID}/})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user