Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 753758 - app-admin/monit-5.27.1 - use upstream's systemd unit
Summary: app-admin/monit-5.27.1 - use upstream's systemd unit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-09 17:54 UTC by Ben Kohler
Modified: 2021-08-25 07:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2020-11-09 17:54:37 UTC
Upstream now supplies a systemd unit, and it will actually get installed & used by default if we just stop calling systemd_dounit in the ebuild.  I think we should use theirs instead of a gentoo-specific one.

Here's how the upstream unit differs:

diff -ur app-admin/monit/files/monit.service /var/tmp/portage/app-admin/monit-5.27.1/work/monit-5.27.1/system/startup/monit.service
--- app-admin/monit/files/monit.service 2015-08-08 19:38:18.000000000 -0500
+++ /var/tmp/portage/app-admin/monit-5.27.1/work/monit-5.27.1/system/startup/monit.service      2020-11-09 11:50:46.421111037 -0600
@@ -1,11 +1,33 @@
+# This file is systemd template for monit service. To
+# register monit with systemd, place the monit.service file
+# to the /lib/systemd/system/ directory and then start it
+# using systemctl (see bellow).
+#
+# Enable monit to start on boot:
+#         systemctl enable monit.service
+#
+# Start monit immediately:
+#         systemctl start monit.service
+#
+# Stop monit:
+#         systemctl stop monit.service
+#
+# Status:
+#         systemctl status monit.service
+
 [Unit]
 Description=Pro-active monitoring utility for unix systems
 After=network.target
+Documentation=man:monit(1) https://mmonit.com/wiki/Monit/HowTo
 
 [Service]
-ExecStart=/usr/bin/monit -I
-ExecStop=/usr/bin/monit quit
-ExecReload=/usr/bin/monit reload
+Type=simple
+KillMode=process
+ExecStart=/usr/bin/monit -I -c /etc/monitrc
+ExecStop=/usr/bin/monit -c /etc/monitrc quit
+ExecReload=/usr/bin/monit -c /etc/monitrc reload
+Restart=on-abnormal
+StandardOutput=null
 
 [Install]
 WantedBy=multi-user.target
Comment 1 Larry the Git Cow gentoo-dev 2021-08-25 07:48:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb4ddc92121ba519113ea2e5412181696ec81333

commit fb4ddc92121ba519113ea2e5412181696ec81333
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-08-25 07:45:15 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-08-25 07:48:08 +0000

    app-admin/monit: Bump to version 5.29.0
    
    Use upstream's systemd unit (#753758)
    
    Closes: https://bugs.gentoo.org/753758
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-admin/monit/Manifest            |  1 +
 app-admin/monit/monit-5.29.0.ebuild | 60 +++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)