net-im/err: add missing initscript
authorSergey Popov <pinkbyte@gentoo.org>
Thu, 2 Aug 2018 13:50:06 +0000 (16:50 +0300)
committerSergey Popov <pinkbyte@gentoo.org>
Thu, 2 Aug 2018 13:54:29 +0000 (16:54 +0300)
Reported-by: Toralf Förster <toralf@gentoo.org>
Closes: https://bugs.gentoo.org/662604
Package-Manager: Portage-2.3.40, Repoman-2.3.9

net-im/err/files/errd.initd.2 [new file with mode: 0755]

diff --git a/net-im/err/files/errd.initd.2 b/net-im/err/files/errd.initd.2
new file mode 100755 (executable)
index 0000000..460cd07
--- /dev/null
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/errbot -u ${ERR_USER}:${ERR_GROUP}"
+command_args="-d -p ${ERR_PID_FILE} -c ${ERR_CONFIG_PATH}/config.py"
+pidfile="${ERR_PID_FILE}"
+
+depend() {
+       need net
+}
+
+start_pre() {
+       # create piddir if necessary, bug #448498
+       local piddir=$(dirname ${ERR_PID_FILE})
+       checkpath -q -d -o err:err -m 0770 "${piddir}" || {
+                eend 1
+                return 1
+        }
+}