rsyslog: write config file to RAM
authorGiacomo Sanchietti <giacomo.sanchietti@nethesis.it>
Thu, 9 Jun 2022 10:46:29 +0000 (12:46 +0200)
committerRosen Penev <rosenp@gmail.com>
Thu, 7 Jul 2022 17:34:58 +0000 (10:34 -0700)
Avoid wearing out flash storage

Signed-off-by: Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>
admin/rsyslog/files/rsyslog.init

index 496308e03622fa0b8a4eedbd629b619f50096e77..6d6d31caf258257842051d43ba5bd11582553b6d 100644 (file)
@@ -6,7 +6,7 @@ START=20
 USE_PROCD=1
 
 UCI_CONF="rsyslog"
-CONFIG_FILE="/etc/rsyslog.conf"
+CONFIG_FILE="/var/etc/rsyslog.conf"
 
 modules=""
 selectors=""
@@ -93,7 +93,7 @@ handle_module() {
 start_service() {
        expand_config
        procd_open_instance
-       procd_set_param command /usr/sbin/rsyslogd -n
+       procd_set_param command /usr/sbin/rsyslogd -f ${CONFIG_FILE} -n
        procd_close_instance
 }