sys-process/atop: systemd support
authorDenis Romanchuk <den4ikkss@gmail.com>
Fri, 13 Nov 2015 01:41:34 +0000 (03:41 +0200)
committerDenis Romanchuk <den4ikkss@gmail.com>
Fri, 13 Nov 2015 01:47:40 +0000 (03:47 +0200)
https://bugs.gentoo.org/show_bug.cgi?id=553310

Package-Manager: portage-2.2.20.1

sys-process/atop/atop-2.2.ebuild
sys-process/atop/files/atop.service [new file with mode: 0644]
sys-process/atop/files/atopacct.service [new file with mode: 0644]

index baa583b9bbf00ae0d78a452b2ba592145d1a13ed..7283c207b5d777e99d64a44ca67b97b2b922a0b3 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI="4"
 
-inherit eutils toolchain-funcs
+inherit eutils toolchain-funcs systemd
 
 MY_PV=${PV//_p/-}
 MY_P=${PN}-${MY_PV}-3
@@ -43,5 +43,7 @@ src_install() {
        rm -f "${ED}"/usr/bin/atop*-${MY_PV}
        newinitd "${FILESDIR}"/${PN}.rc-r1 ${PN}
        newinitd "${FILESDIR}"/atopacct.rc atopacct
+       systemd_dounit "${FILESDIR}"/${PN}.service
+       systemd_dounit "${FILESDIR}"/atopacct.service
        dodoc atop.cronsysv AUTHOR ChangeLog README
 }
diff --git a/sys-process/atop/files/atop.service b/sys-process/atop/files/atop.service
new file mode 100644 (file)
index 0000000..09295b9
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Atop advanced performance monitor
+Documentation=man:atop(1)
+
+[Service]
+Type=simple
+ExecStart=/etc/atop/atop.daily
+KillSignal=SIGUSR2
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-process/atop/files/atopacct.service b/sys-process/atop/files/atopacct.service
new file mode 100644 (file)
index 0000000..1f51ec4
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Atop process accounting daemon
+Documentation=man:atopacctd(8)
+Conflicts=psacct.service
+After=syslog.target
+Before=atop.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/atopacctd.pid
+ExecStart=/usr/sbin/atopacctd
+
+[Install]
+WantedBy=multi-user.target