Files
quectel-rgmii-toolkit/ipk-source/sdxpinn-quecmanager-beta/CONTROL/postinst
Cameron Thompson 0e74abe7db QuecManager BETA 1.0.6
- Resolved IMEI Mangling Issue
- Optimized Logging and AT Operations: Centralized logging to smd7 and redirected all AT operations to smd11 to prevent request conflicts.
- Introduced Cell Locking Scheduler
- Fixed SMS Inbox Loading Issue: Addressed a bug where the SMS inbox would get stuck during loading.
- Enhanced Speedtest Output: Updated speed test results to display values with two decimal points when reaching GBps speeds.
- Changed Link Speed from "Unknown!" to "-" when link is not active
- Added 5 second cooldown to speedtest

Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
2024-12-21 16:11:55 -05:00

67 lines
1.7 KiB
Bash
Executable File

#!/bin/ash
# Backup the original index.html and replace with login.html
mv /www/index.html /www/index.html.old
cp /www/login.html /www/index.html
# Define the commands to add to rc.local
COMMANDS="/www/cgi-bin/settings/change_sms_code.sh &
/www/cgi-bin/home/log_signal_metrics.sh &"
# Create a new rc.local with commands correctly placed
TMP_RC_LOCAL=$(mktemp)
awk -v commands="$COMMANDS" '
BEGIN {
split(commands, cmdArr, "\n") # Split commands into an array
for (i in cmdArr) alreadyAdded[cmdArr[i]] = 0
added = 0
}
{
if ($0 in alreadyAdded) {
alreadyAdded[$0] = 1
next
}
if (/^# Put your custom commands here/) {
print
if (!added) {
for (i in cmdArr) if (!alreadyAdded[cmdArr[i]]) {
print cmdArr[i]
alreadyAdded[cmdArr[i]] = 1
}
print ""
added = 1
}
} else {
print
}
}
END {
# Add any missing commands at the end of the section
for (i in cmdArr) if (!alreadyAdded[cmdArr[i]]) print cmdArr[i]
}
' /etc/rc.local > "$TMP_RC_LOCAL"
# Replace the original rc.local with the modified one
mv "$TMP_RC_LOCAL" /etc/rc.local
chmod +x /etc/rc.local
# Ensure log_signal_metrics.sh is running
if ! pgrep -f "/www/cgi-bin/home/log_signal_metrics.sh" > /dev/null; then
echo "Starting log_signal_metrics.sh..."
/www/cgi-bin/home/log_signal_metrics.sh &
else
echo "log_signal_metrics.sh is already running. Skipping start."
fi
# Ensure change_sms_code.sh is running
if ! pgrep -f "/www/cgi-bin/settings/change_sms_code.sh" > /dev/null; then
echo "Starting change_sms_code.sh..."
/www/cgi-bin/settings/change_sms_code.sh &
else
echo "change_sms_code.sh is already running. Skipping start."
fi
exit 0