commit:     d8b89a668b1eb96f30b427e3d83a968d6630a3f9
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Tue Jan  5 22:15:14 2021 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Tue Jan  5 22:15:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d8b89a66

www-apps/jackett-bin: add systemd service

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 www-apps/jackett-bin/files/jackett.service              | 17 +++++++++++++++++
 ...n-0.17.197.ebuild => jackett-bin-0.17.197-r1.ebuild} |  3 +++
 2 files changed, 20 insertions(+)

diff --git a/www-apps/jackett-bin/files/jackett.service 
b/www-apps/jackett-bin/files/jackett.service
new file mode 100644
index 00000000..b2f2ee87
--- /dev/null
+++ b/www-apps/jackett-bin/files/jackett.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Jackett Daemon
+After=network.target
+
+[Service]
+SyslogIdentifier=jackett
+Restart=always
+RestartSec=5
+Type=simple
+User=jackett
+Group=jackett
+WorkingDirectory=/var/jackett
+ExecStart=/bin/sh "/opt/jackett/jackett_launcher.sh"
+TimeoutStopSec=30
+
+[Install]
+WantedBy=multi-user.target

diff --git a/www-apps/jackett-bin/jackett-bin-0.17.197.ebuild 
b/www-apps/jackett-bin/jackett-bin-0.17.197-r1.ebuild
similarity index 93%
rename from www-apps/jackett-bin/jackett-bin-0.17.197.ebuild
rename to www-apps/jackett-bin/jackett-bin-0.17.197-r1.ebuild
index 3e915d39..b2966ed1 100644
--- a/www-apps/jackett-bin/jackett-bin-0.17.197.ebuild
+++ b/www-apps/jackett-bin/jackett-bin-0.17.197-r1.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=7
 
+inherit systemd
+
 DESCRIPTION="API Support for your favorite torrent trackers"
 HOMEPAGE="https://github.com/Jackett/Jackett";
 SRC_URI="
@@ -29,5 +31,6 @@ src_install() {
        dodir /opt/jackett
        cp -a "${S}"/. "${ED}"/opt/jackett || die
        newinitd "${FILESDIR}"/jackett.initd jackett
+       systemd_dounit "${FILESDIR}"/jackett.service
        doenvd "${FILESDIR}"/99jackett
 }

Reply via email to