summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-irc/unrealircd/files')
-rw-r--r--net-irc/unrealircd/files/unrealircd.confd-r132
-rw-r--r--net-irc/unrealircd/files/unrealircd.initd44
2 files changed, 76 insertions, 0 deletions
diff --git a/net-irc/unrealircd/files/unrealircd.confd-r1 b/net-irc/unrealircd/files/unrealircd.confd-r1
new file mode 100644
index 000000000000..59b8f426cd24
--- /dev/null
+++ b/net-irc/unrealircd/files/unrealircd.confd-r1
@@ -0,0 +1,32 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# user to run unrealircd as
+UNREALIRCD_USER="unrealircd"
+
+# Which configuration file to load instead of unrealircd.conf. If you
+# want to run multiple instances of unrealircd, you must edit
+# files::pidfile to match UNREALIRCD_PIDFILE. You should also ensure
+# that files::tunefile is different for each unrealircd instance. See
+# http://unrealircd.org/docs.php#filesblock.
+#
+# To support multiple instances of unrealircd, you may create symlinks
+# in /etc/init.d pointing to /etc/init.d/unrealircd. It is recommended
+# that the scheme unrealircd.${instance_name} be used. For each
+# instance, you may make a copy of this file with the appropriate name
+# to override default options specific to that instance.
+UNREALIRCD_CONF="/etc/unrealircd/${SVCNAME}.conf"
+
+# The path where unrealircd is configured to create its pidfile.
+UNREALIRCD_PIDFILE="/var/run/unrealircd/${SVCNAME#unreal}.pid"
+
+# extra options to pass to unrealircd ...
+# You should not specify the -f option here; use
+# UNREALIRCD_CONF instead.
+#
+# [-h servername]
+# [-p portnumber]
+# [-x loglevel]
+# [-t] (to enable debug output)
+UNREALIRCD_OPTS=""
diff --git a/net-irc/unrealircd/files/unrealircd.initd b/net-irc/unrealircd/files/unrealircd.initd
new file mode 100644
index 000000000000..6d837ec0f2ac
--- /dev/null
+++ b/net-irc/unrealircd/files/unrealircd.initd
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+# Defaults
+: ${UNREALIRCD_USER:=unrealircd}
+: ${UNREALIRCD_CONF:=/etc/unrealircd/${SVCNAME}.conf}
+: ${UNREALIRCD_PIDFILE:=/var/run/unrealircd/${SVCNAME#unreal}.pid}
+
+depend() {
+ use dns net
+ provide ircd
+}
+
+start() {
+ UNREALIRCD_PIDFILEDIR=${UNREALIRCD_PIDFILE%/*}
+ if ! [ -d "${UNREALIRCD_PIDFILEDIR}" ]; then
+ ebegin "Creating ${UNREALIRCD_PIDFILEDIR} for ${SVCNAME}"
+ mkdir "${UNREALIRCD_PIDFILEDIR}" \
+ && chown :unrealircd "${UNREALIRCD_PIDFILEDIR}" \
+ && chmod 770 "${UNREALIRCD_PIDFILEDIR}"
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/bin/unrealircd \
+ --user ${UNREALIRCD_USER} --pidfile "${UNREALIRCD_PIDFILE}" -- -f "${UNREALIRCD_CONF}" ${UNREALIRCD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile "${UNREALIRCD_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --quiet --pidfile "${UNREALIRCD_PIDFILE}"
+ eend $?
+}