taamarin / box_for_magisk

Transparent Proxy for Android(root)
GNU General Public License v3.0
1.01k stars 111 forks source link

日志文件定时清理 #36

Closed cxyzzz closed 11 months ago

cxyzzz commented 11 months ago

如果长时间使用日志文件会变的非常大,亦或者是由于经常重启产生很多个日志文件,能否添加定时清理功能?或者重定向到系统日志里(不知道这样会不会影响系统性能)

taamarin commented 11 months ago

如果长时间使用日志文件会变的非常大,亦或者是由于经常重启产生很多个日志文件,能否添加定时清理功能?或者重定向到系统日志里(不知道这样会不会影响系统性能)

删除这一行

https://github.com/taamarin/box_for_magisk/blob/0b09040840ef378d92b3f0a6577353ce91d5f3f3/box/scripts/box.service#L8-L15

clash

设置 log-level: silent

mode: rule
allow-lan: true
bind-address: '*'
log-level: silent
taamarin commented 11 months ago

或者,改变 https://github.com/taamarin/box_for_magisk/blob/0b09040840ef378d92b3f0a6577353ce91d5f3f3/box/scripts/box.service#L329

变得

nohup busybox setuidgid "${box_user_group}" "${bin_path}" -d "${box_dir}/${bin_name}" -f "${clash_config}" > /dev/null 2>&1 &