feat(service): clear logd size props on boot
Spawn a backgrounded subshell from service.sh that polls sys.boot_completed once per second and, once set, blanks the persist.logd.size variants (root, crash, system, main). Runs alongside the existing supervisor fork so daemon startup is unaffected. Idempotent across reboots: even if a previous boot already cleared the props, setting them to empty again is a no-op.
This commit is contained in:
@@ -3,3 +3,14 @@ cd $MODDIR
|
||||
|
||||
# Fork-based supervisor for instant restart
|
||||
./supervisor ./daemon "$MODDIR" &
|
||||
|
||||
# Clear logd size persist properties once boot completes
|
||||
(
|
||||
until [ "$(getprop sys.boot_completed)" = "1" ]; do
|
||||
sleep 1
|
||||
done
|
||||
setprop persist.logd.size ""
|
||||
setprop persist.logd.size.crash ""
|
||||
setprop persist.logd.size.system ""
|
||||
setprop persist.logd.size.main ""
|
||||
) &
|
||||
|
||||
Reference in New Issue
Block a user