I've extracted and repackaged the official .deb files for filebeat, packetbeat, and topbeat, so I can include my own configs and certs and deploy via puppet. I've also added my own postinst and prerm files to update rc.d and start the service via the included init.d script.
All is well, except that the service won't start when the deb is installed via
apt-get. If I install the same .deb files using
dpkg -i <debname> it starts up fine.
Using topbeat as an example, I've added some debug and the init.d script is getting as far as the start-stop-daemon attempting to run topbeat-god, but nothing appears to happen at that point.
start-stop-daemon -v, but all I get is output telling me it's starting topbeat-god. Similarly, adding
-l /tmp/topbeat-god to topbeat-god just creates an empty file, but the service isn't running when I check.
For completeness, my postinst script is:
echo "Updating rc.d"
/usr/sbin/update-rc.d topbeat defaults > /dev/null
if pgrep "topbeat" > /dev/null
echo "Restarting topbeat"
echo "Starting topbeat"
It's definitely hitting each step as it's echoing the output, and the rc.d updates are taking place.
Running the init.d script after installing with apt-get starts the service as expected. It just won't start on install.
I suspect there's some sort of environment issue running topbeat-god from apt-get, but I don't know where to look for clues. Can I get some more verbose output, or does someone know what the problem may be?
System is Ubuntu 14.04.3 64bit.
Beats are all v. 1.0.1