Permalink
Browse files

irker: Add OpenRC init.d script

  • Loading branch information...
laurentb committed Oct 10, 2012
1 parent 1865311 commit be7889aa595c5dd9dcfabd4c6a67085e79085712
Showing with 33 additions and 1 deletion.
  1. +23 −0 dev-vcs/irker/files/irkerd-init.d
  2. +10 −1 dev-vcs/irker/irker-1.11.ebuild
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --background --exec /usr/bin/irkerd \
+ --pidfile ${PIDFILE} --make-pidfile \
+ --user irker:irker
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${PIDFILE}
+ eend $?
+}
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=4
-inherit base python
+inherit base user python
DESCRIPTION="Specialized IRC notification daemon"
HOMEPAGE="http://www.catb.org/esr/irker/"
@@ -25,6 +25,13 @@ src_prepare() {
sed -i 's/xmlto/xmlto --skip-validation/' Makefile
}
+pkg_setup() {
+ python_pkg_setup
+
+ enewgroup irker
+ enewuser irker -1 -1 -1 irker
+}
+
src_install() {
base_src_install
@@ -33,6 +40,8 @@ src_install() {
exeinto /usr/libexec
newexe irkerhook.py irkerhook
+
+ newinitd "${FILESDIR}"/irkerd-init.d irker
}
DOCS=(README NEWS COPYING hacking.txt install.txt security.txt filter-example.py

0 comments on commit be7889a

Please sign in to comment.