- Updated Package:
sdxpinn-quecmanager to 0.0.3
- Fixed issue described here: c8faf539c1
- Updated package sdxpinn-console-menu to 0.0.2
- Added new menu: LAN Settings
- Will let you edit the LAN settings. Only for DMZ mode or normal LAN mode not mpdn_rule. Work in Progress.
- Updated package tailscaled tailscale to 1.76.1
See tailscale's website for chnagelog
Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
60 lines
1.5 KiB
Bash
Executable File
60 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
echo "Content-type: application/json"
|
|
echo ""
|
|
|
|
CONFIG_FILE="/etc/quecmanager/cell_lock_config.txt"
|
|
|
|
if [ ! -f "$CONFIG_FILE" ]; then
|
|
echo '{"status": "error", "message": "No cell lock configurations found", "configurations": {}}'
|
|
exit 0
|
|
fi
|
|
|
|
# Function to read config values
|
|
get_config_value() {
|
|
local key=$1
|
|
local value=$(grep "^$key=" "$CONFIG_FILE" | sed "s/^$key=//")
|
|
# Remove any trailing whitespace or comments
|
|
value=$(echo "$value" | sed 's/[[:space:]]*#.*$//' | sed 's/[[:space:]]*$//')
|
|
echo "$value"
|
|
}
|
|
|
|
# Read LTE configuration values
|
|
earfcn1=$(get_config_value "earfcn1")
|
|
pci1=$(get_config_value "pci1")
|
|
earfcn2=$(get_config_value "earfcn2")
|
|
pci2=$(get_config_value "pci2")
|
|
earfcn3=$(get_config_value "earfcn3")
|
|
pci3=$(get_config_value "pci3")
|
|
|
|
# Read 5G-SA configuration values
|
|
nrarfcn=$(get_config_value "nrarfcn")
|
|
nrpci=$(get_config_value "nrpci")
|
|
scs=$(get_config_value "scs")
|
|
band=$(get_config_value "band")
|
|
|
|
# Debug output to syslog
|
|
logger "fetch-cell-lock: earfcn1=$earfcn1 pci1=$pci1 nrarfcn=$nrarfcn nrpci=$nrpci"
|
|
|
|
# Construct JSON response
|
|
cat << EOF
|
|
{
|
|
"status": "success",
|
|
"configurations": {
|
|
"lte": {
|
|
"earfcn1": "${earfcn1:-}",
|
|
"pci1": "${pci1:-}",
|
|
"earfcn2": "${earfcn2:-}",
|
|
"pci2": "${pci2:-}",
|
|
"earfcn3": "${earfcn3:-}",
|
|
"pci3": "${pci3:-}"
|
|
},
|
|
"sa": {
|
|
"nrarfcn": "${nrarfcn:-}",
|
|
"nrpci": "${nrpci:-}",
|
|
"scs": "${scs:-}",
|
|
"band": "${band:-}"
|
|
}
|
|
}
|
|
}
|
|
EOF |