app-admin/supervisor: add systemd unit
authorGilles Dartiguelongue <eva@gentoo.org>
Thu, 24 May 2018 06:43:25 +0000 (08:43 +0200)
committerGilles Dartiguelongue <eva@gentoo.org>
Thu, 24 May 2018 06:46:27 +0000 (08:46 +0200)
Package-Manager: Portage-2.3.36, Repoman-2.3.9

app-admin/supervisor/files/supervisord.service [new file with mode: 0644]
app-admin/supervisor/supervisor-3.3.4.ebuild

diff --git a/app-admin/supervisor/files/supervisord.service b/app-admin/supervisor/files/supervisord.service
new file mode 100644 (file)
index 0000000..4ccd1ca
--- /dev/null
@@ -0,0 +1,15 @@
+[Unit]
+Description=Supervisor process control system for UNIX
+Documentation=http://supervisord.org
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/supervisord -n -c /etc/supervisord.conf
+ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown
+ExecReload=/usr/bin/supervisorctl -c /etc/supervisord.conf $OPTIONS reload
+KillMode=process
+Restart=on-failure
+RestartSec=50s
+
+[Install]
+WantedBy=multi-user.target
index ce186e3a46ad6a1a1e1377446ab57e97b6db7ce2..1b78252cdb4dee75df008b9fe94c39836ae63fdc 100644 (file)
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python2_7 )     # py2 only
 # xml.etree.ElementTree module required.
 PYTHON_REQ_USE="xml"
 
-inherit distutils-r1 user
+inherit distutils-r1 systemd user
 
 MY_PV="${PV/_beta/b}"
 
@@ -61,6 +61,7 @@ python_install_all() {
        insinto /etc
        doins "${FILESDIR}/supervisord.conf"
        keepdir /var/log/supervisor
+       systemd_dounit "${FILESDIR}/supervisord.service"
 }
 
 pkg_preinst() {