Hello Holger,
Yeah, I did remember and I think we should have a generic solution to avoid adding many scripts of this style.
I just sent a patch for testing. Could you please check if this works for you?
https://patchwork.ipfire.org/project/ipfire/patch/20210727085900.2253-1-mich...
Best, -Michael
On 26 Jul 2021, at 20:27, Holger Sunke holger.sunke@posteo.de wrote:
+++ b/src/initscripts/packages/node_exporter @@ -0,0 +1,39 @@ +#!/bin/sh +######################################################################## +# Begin $rc_base/init.d/ +#
99>> +++ b/src/scripts/node_exporter_starter.sh
@@ -0,0 +1,7 @@ +#/bin/bash
+# read configurable OPTIONS +. /etc/node_exporter_options
+/usr/bin/node_exporter $OPTIONS >> /var/log/node_exporter.log 2>&1 &
-- 2.30.2
What is this for again? -Michael
The script above is a workaround for the issue that node_exporter does not have a fork functionality - we wrote about this earlier:
Hello,
On 9 Jun 2021, at 07:14, Holger Sunke holger.sunke@posteo.de wrote:
Hello Michael,
the node exporter does not have a daemon mode. I could alternatively pip the output into a log file:
loadproc /usr/bin/node_exporter $OPTIONS >> /var/log/node_exporter.log 2>&1 &
Hmm, so there are two problems here:
- loadproc shows [ OK ] or [ ERROR ] so that the user knows if the > program was started successfully. That is now being thrown away.
- Anything useful that node_exporter would print is also being thrown away
This seems to become a common thing that they remove the fork mode, maybe we need a special version of loadproc() that can handle that.
Should I add a third patch to do my fixes or adjust patch 1 & 2 each?
Let’s work on Go first and get that merged and then come back to this one.
We need to have a solution first and then implement it.
-Michael