Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**scribe** is a **syslog-ng** and **logrotate** installer for ASUS routers running **Asuswrt-Merlin**

## v3.2.7
### Updated on 2026-Jan-03
### Updated on 2026-Jan-04

## Getting Started

Expand Down
27 changes: 23 additions & 4 deletions scribe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# curl --retry 3 "https://raw.githubusercontent.com/AMTM-OSR/scribe/master/scribe.h" -o "/jffs/scripts/scribe" && chmod 0755 /jffs/scripts/scribe && /jffs/scripts/scribe install
#
##################################################################
# Last Modified: 2026-Jan-03
# Last Modified: 2026-Jan-04
#-----------------------------------------------------------------

################ Shellcheck directives ################
Expand All @@ -35,7 +35,7 @@

readonly script_name="scribe"
readonly scribe_ver="v3.2.7"
readonly scriptVer_TAG="26010323"
readonly scriptVer_TAG="26010400"
scribe_branch="develop"
script_branch="$scribe_branch"

Expand Down Expand Up @@ -186,8 +186,8 @@ readonly LR_FLock_FName="/tmp/scribeLogRotate.flock"
readonly logFilesRegExp="${optVarLogDir}/.*([.]log)?"
readonly filteredLogList="${config_d}/.filteredlogs"
readonly noConfigLogList="${config_d}/.noconfiglogs"
readonly sysLogMsgSizeMAX=10240
readonly sysLogFiFoSizeMIN=1024
sysLogMsgSizeMAX=10240
sysLogFiFoSizeMIN=1024

# color constants #
readonly red="\033[1;31m"
Expand Down Expand Up @@ -1195,6 +1195,19 @@ _AcquireFLock_()
_ReleaseFLock_()
{ flock -u "$LR_FLock_FD" ; }

##-------------------------------------##
## Added by Martinski W. [2026-Jan-04] ##
##-------------------------------------##
_HasRouterMoreThan512MBtotalRAM_()
{
local totalRAM_KB
totalRAM_KB="$(awk -F ' ' '/^MemTotal:/{print $2}' /proc/meminfo)"
if [ -n "$totalRAM_KB" ] && [ "$totalRAM_KB" -gt 524288 ]
then return 0
else return 1
fi
}

##-------------------------------------##
## Added by Martinski W. [2025-Dec-05] ##
##-------------------------------------##
Expand Down Expand Up @@ -2400,6 +2413,12 @@ scribe_menu()

SetUpRepoBranchVars

## Increase FIFO queue size if 1GB RAM or more ##
if _HasRouterMoreThan512MBtotalRAM_
then sysLogFiFoSizeMIN=2048
else sysLogFiFoSizeMIN=1024
fi

if ! SyslogDm_Running && ! SyslogNg_Running
then
printf "\n\n${red} *WARNING*: $white No system logger was running!!\n"
Expand Down