- Resolved SMS Inbox Display Issue: Fixed a bug preventing messages from being displayed in the SMS inbox. - Enhanced SMS Inbox Functionality: Optimized the SMS inbox to group messages with the same sender and timestamp. - Corrected Signal Metrics Calculation: Addressed inaccuracies in the calculation of signal metrics. - Updated Speedtest Cooldown: Increased the cooldown period for speed tests from 5 seconds to 10 seconds. - Improved Speedtest Cleanup: Ensured the pipe is removed automatically after the speed test completes. - Updated to NextJS 15 - Improved Quecwatch script Co-Authored-By: Russel Yasol <73575327+dr-dolomite@users.noreply.github.com>
67 lines
1.8 KiB
Bash
Executable File
67 lines
1.8 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 (/^# the system init finished. By default/) {
|
|
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
|
|
|