From 39443a1f935dca087f05ff0a3ebe97a2203688fc Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 6 Jun 2019 10:19:28 +0800 Subject: nagios-nrpe: fix systemd service start failed Jun 06 01:44:51 qemux86 systemd[1]: Started Nagios nrpe plugin. Jun 06 01:44:51 qemux86 nrpe[1263]: Starting up daemon Jun 06 01:44:51 qemux86 nrpe[1263]: Cannot write to pidfile '/var/nagios/nrpe.pid' - check your privileges. Jun 06 01:44:51 qemux86 systemd[1]: nagios-nrpe.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Jun 06 01:44:51 qemux86 systemd[1]: nagios-nrpe.service: Failed with result 'exit-code' In configuration file /etc/nagios/nrpe.cfg, the pidfile is under /var/nagios. fix by stop rm the /var/nagios, and include it into daemon packages Signed-off-by: Changqing Li Signed-off-by: Bruce Ashfield --- recipes-extended/nagios/nagios-nrpe_3.2.1.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes-extended/nagios/nagios-nrpe_3.2.1.bb b/recipes-extended/nagios/nagios-nrpe_3.2.1.bb index 94933367..3afa5dd9 100644 --- a/recipes-extended/nagios/nagios-nrpe_3.2.1.bb +++ b/recipes-extended/nagios/nagios-nrpe_3.2.1.bb @@ -73,8 +73,6 @@ do_install_append() { install -d ${D}${systemd_unitdir}/system install -m 644 ${WORKDIR}/nagios-nrpe.service ${D}${systemd_unitdir}/system/ fi - - rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/nagios } PACKAGES = "${PN}-dbg ${PN}-plugin ${PN}-daemon" @@ -86,6 +84,7 @@ FILES_${PN}-plugin = "${NAGIOS_PLUGIN_DIR} \ FILES_${PN}-daemon = "${sysconfdir} \ ${bindir} \ ${nonarch_libdir}/tmpfiles.d/ \ + ${localstatedir} \ " RDEPENDS_${PN}-daemon = "nagios-base" -- cgit v1.2.3-54-g00ecf