PID number missing
- Install the Agent with all Dependencies on both a FreeBSD 10.2 and Debian 8
- Expected result: Agent can be started in daemon mode (OK), PID file gets created (OK), but: It's an empty file.
On Debian the init script doesn't use the PID file created since it uses start-stop-daemon when installed from the
Distribution package. However on FreeBSD rc(8) I wanted to write a rc config file which wants to know the PID file
location to kill the process when the rc is asked to stop the agent. Resulting in the effect that that the daemon can be
started but not stopped.
I guess that the mechanism doing so is creating the PID file but forgets about writing the process ID.
#1 Updated by Guillaume Bougard over 2 years ago
- Status changed from New to Feedback
FIA uses PROC::Daemon library to daemonize. And this library is intended to write the pidfile. Maybe this library is not doing the job on your platform.
Btw you should specify --pidfile on command-line while starting the daemon. Actually, on a Debian 8.2, I can see the daemon started (pid file not empty) as :
/usr/bin/perl /usr/bin/fusioninventory-agent --daemon --pidfile /var/run/fusioninventory-agent.pid
If you don't specify pidfile, it will be defaulted against the current vardir folder (/var/lib/fusioninventory on Debian, or ./var if official sources).
Can you confirm the way you're starting the daemon ?