From ea323c852d677f8077916305346267280922658b Mon Sep 17 00:00:00 2001 From: MegaV0lt Date: Thu, 26 Sep 2019 09:53:27 +0200 Subject: [PATCH] Update log2ram.initd Custom function write() to avoid restart of log2ram via cron --- log2ram.initd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/log2ram.initd b/log2ram.initd index 0df69b8..8cf4aa6 100644 --- a/log2ram.initd +++ b/log2ram.initd @@ -5,6 +5,9 @@ description="Store logfiles in RAM to minimize writes to disk." +# Command is available when the service is started +extra_started_commands="write" + depend() { need localmount before logger @@ -22,7 +25,7 @@ stop() { eend $? } -restart() { +write() { ebegin "Syncing logs to disk" /usr/local/bin/log2ram write eend $?