public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-irc/irc-server/files: ircd.rc ircd.confd
@ 2008-07-14 14:41 Raul Porcel (armin76)
  0 siblings, 0 replies; only message in thread
From: Raul Porcel (armin76) @ 2008-07-14 14:41 UTC (permalink / raw
  To: gentoo-commits

armin76     08/07/14 14:41:54

  Modified:             ircd.rc
  Added:                ircd.confd
  Log:
  Fix log files dir, make it run as ircd user, etc, bug #218052, enhancements by Ville Mattila <vm at iki dot fi>
  (Portage version: 2.2_rc1/cvs/Linux 2.6.24-gentoo-r8 i686)

Revision  Changes    Path
1.5                  net-irc/irc-server/files/ircd.rc

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/irc-server/files/ircd.rc?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/irc-server/files/ircd.rc?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/irc-server/files/ircd.rc?r1=1.4&r2=1.5

Index: ircd.rc
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-irc/irc-server/files/ircd.rc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ircd.rc	2 Sep 2005 15:10:50 -0000	1.4
+++ ircd.rc	14 Jul 2008 14:41:54 -0000	1.5
@@ -1,20 +1,31 @@
 #!/sbin/runscript
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/files/ircd.rc,v 1.4 2005/09/02 15:10:50 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/files/ircd.rc,v 1.5 2008/07/14 14:41:54 armin76 Exp $
 
 depend() {
 	use net
 }
 
+IRCD_USER=${IRCD_USER:-ircd}
+
+checkconfig() {
+	if [ ! -e /etc/ircd/ircd.conf ] ; then
+		eerror "You need to create /etc/ircd/ircd.conf first."
+		eerror "An example can be found in /etc/ircd/ircd.conf.example"
+		return 1
+	fi
+}
+
 start() {
+        checkconfig || return $?
 	ebegin "Starting ircd"
-	start-stop-daemon --start --quiet --exec /usr/sbin/ircd
-	eend ${?}
+	start-stop-daemon --start --quiet --chuid "${IRCD_USER}" --exec /usr/sbin/ircd -- ${IRCD_OPTS}
+	eend $?
 }
 
 stop() {
 	ebegin "Stopping ircd"
 	start-stop-daemon --stop --quiet --pidfile /var/run/ircd/ircd.pid
-	eend ${?}
+	eend $?
 }



1.1                  net-irc/irc-server/files/ircd.confd

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/irc-server/files/ircd.confd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/irc-server/files/ircd.confd?rev=1.1&content-type=text/plain

Index: ircd.confd
===================================================================
# /etc/conf.d/ircd: configuration for /etc/init.d/ircd

# User account to run ircd as.

#IRCD_USER="ircd"

# Put any additional options for ircd here.
# See ircd(8) for more information.

#IRCD_OPTS=""



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-14 14:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-14 14:41 [gentoo-commits] gentoo-x86 commit in net-irc/irc-server/files: ircd.rc ircd.confd Raul Porcel (armin76)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox