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.11
### Updated on 2026-Feb-18
### Updated on 2026-Feb-22

## Getting Started

Expand Down
23 changes: 11 additions & 12 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-Feb-18
# Last Modified: 2026-Feb-21
#-----------------------------------------------------------------

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

readonly script_name="scribe"
readonly scribe_ver="v3.2.11"
readonly scriptVer_TAG="26021800"
readonly scriptVer_TAG="26022123"
scribe_branch="develop"
script_branch="$scribe_branch"

Expand Down Expand Up @@ -1371,18 +1371,17 @@ Show_SysLogNg_LoadedConfig()
##-------------------------------------##
_AcquireFLock_()
{
local opts=""
eval exec "$LR_FLock_FD>$LR_FLock_FName"

if [ $# -eq 1 ] && [ "$1" = "nonblock" ]
then opts="-n"
local opts="-n"
if [ $# -gt 0 ] && [ "$1" = "waitblock" ]
then opts=""
fi
flock -x $opts "$LR_FLock_FD"
eval exec "$LR_FLock_FD>$LR_FLock_FName"
flock -x $opts "$LR_FLock_FD" 2>/dev/null
return "$?"
}

_ReleaseFLock_()
{ flock -u "$LR_FLock_FD" ; }
{ flock -u "$LR_FLock_FD" 2>/dev/null ; }

##-------------------------------------##
## Added by Martinski W. [2026-Jan-04] ##
Expand Down Expand Up @@ -2295,7 +2294,7 @@ Gather_Debug()
fi

printf "\n%s\n### logrotate debug output:\n" "$debug_sep" >> "$script_debug"
if _AcquireFLock_
if _AcquireFLock_ nonblock
then
_DoRotateLogFiles_ DEBUG
_ReleaseFLock_
Expand Down Expand Up @@ -2875,7 +2874,7 @@ Scribe_Menu()
;;
ld)
delfr "$lr_temp"
if _AcquireFLock_
if _AcquireFLock_ nonblock
then
_DoRotateLogFiles_ DEBUG TEMP
_ReleaseFLock_
Expand Down Expand Up @@ -3089,7 +3088,7 @@ case "$action" in
;;

LogRotateDebug)
if _AcquireFLock_
if _AcquireFLock_ nonblock
then
delfr "$lr_temp"
_DoRotateLogFiles_ DEBUG TEMP
Expand Down