Commits

Leho Kraav committed fa9b6b2

gentoo init.d script for qwebirc

  • Participants
  • Parent commits 4880855

Comments (0)

Files changed (2)

File gentoo-init-scripts.patch

+# HG changeset patch
+# Parent f62bc5faa9831c46bba4498a255c7b115781689c
+
+diff --git a/scripts/gentoo/qwebirc.confd b/scripts/gentoo/qwebirc.confd
+new file mode 100644
+--- /dev/null
++++ b/scripts/gentoo/qwebirc.confd
+@@ -0,0 +1,1 @@
++PORT=6665
+diff --git a/scripts/gentoo/qwebirc.initd b/scripts/gentoo/qwebirc.initd
+new file mode 100755
+--- /dev/null
++++ b/scripts/gentoo/qwebirc.initd
+@@ -0,0 +1,27 @@
++#!/sbin/runscript
++# Copyright 1999-2011 Gentoo Foundation
++# Distributed under the terms of the GNU General Public License v2
++# $Header: qwebirc.initd,v 1.0 2011/03/11 12:11:50 lkraav Exp $
++
++SVCHOME="/home/qwebirc"
++LOGFILE="/var/log/qwebirc.log"
++
++depend() {
++    use net
++    need inspircd localmount
++    after bootmisc
++}
++
++start() {
++    ebegin "Starting ${SVCNAME}"
++    start-stop-daemon --start --chuid qwebirc:qwebirc --chdir ${SVCHOME} \
++        --quiet --exec ${SVCHOME}/run.py \
++        -- -l ${LOGFILE} -p ${PORT} -P /var/run/qwebirc/${SVCNAME}.pid
++    eend $?
++}
++
++stop() {
++    ebegin "Stopping ${SVCNAME}"
++    start-stop-daemon --stop --quiet --pidfile /var/run/qwebirc/${SVCNAME}.pid
++	eend $?
++}
-# Placed by Bitbucket
+gentoo-init-scripts.patch