From 460016e2c098fc696eafb19c53d1fc58f90cfdc3 Mon Sep 17 00:00:00 2001 From: maoerpet Date: Wed, 15 Jan 2025 21:41:07 +0800 Subject: [PATCH] syncthing: change Syncthing logfile location to /var/log/syncthing.log for in-memory storage Changed logfile path from /etc/syncthing/syncthing.log to /var/log/syncthing.log. This utilizes tmpfs (memory-based storage) to prevent disk usage growth caused by log file accumulation during extended operation. - Avoids storage saturation from excessive log growth. - Aligns with best practices for temporary log management. Signed-off-by: maoerpet --- utils/syncthing/files/syncthing.conf | 2 +- utils/syncthing/files/syncthing.init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/syncthing/files/syncthing.conf b/utils/syncthing/files/syncthing.conf index 193f5e9ea8bdb..6c388cc871da1 100644 --- a/utils/syncthing/files/syncthing.conf +++ b/utils/syncthing/files/syncthing.conf @@ -24,7 +24,7 @@ config syncthing 'syncthing' # Running as 'root' is possible, but not recommended option user 'syncthing' - option logfile '/etc/syncthing/syncthing.log' + option logfile '/var/log/syncthing.log' option log_max_old_files 7 # Size in bytes option log_max_size 1048576 diff --git a/utils/syncthing/files/syncthing.init b/utils/syncthing/files/syncthing.init index 9fa1ddf402320..6cc907c284102 100644 --- a/utils/syncthing/files/syncthing.init +++ b/utils/syncthing/files/syncthing.init @@ -48,7 +48,7 @@ start_service() { local enabled=0 local gui_address="http://0.0.0.0:8384" local home="/etc/syncthing" - local logfile="/etc/syncthing/syncthing.log" + local logfile="/var/log/syncthing.log" local macprocs=0 local nice=0 local user="syncthing"