public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-irc/rbot/files: rbot.init2 rbot.conf2
@ 2010-07-28  7:58 Alex Legler (a3li)
  0 siblings, 0 replies; only message in thread
From: Alex Legler (a3li) @ 2010-07-28  7:58 UTC (permalink / raw
  To: gentoo-commits

a3li        10/07/28 07:58:09

  Added:                rbot.init2 rbot.conf2
  Log:
  Version bump, closes bug 330125 by Jens Pranaitis. Ebuild now uses the ruby-ng eclass. Adds support for specifying a Ruby interpreter for rbot. Add fi to LINGUAS.
  (Portage version: 2.2_rc67/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  net-irc/rbot/files/rbot.init2

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/files/rbot.init2?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/files/rbot.init2?rev=1.1&content-type=text/plain

Index: rbot.init2
===================================================================
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/files/rbot.init2,v 1.1 2010/07/28 07:58:08 a3li Exp $

depend() {
	 need net
	 use dns
}

start() {
	if ! [ -d "${RBOTDIR}" ]; then
		eerror "The path you specified (${RBOTDIR}) is not a directory."
		eerror "Please set RBOTDIR variable in /etc/conf.d/${SVCNAME}"
		eerror "to a proper value for an rbot base directory."
		return 1
	fi

	if ! [ -f "${RBOTDIR}/conf.yaml" ]; then
		eerror "You didn't configure rbot yet. Please configure rbot by running"
		eerror "	rbot ${RBOTDIR}"
		eerror "at least once."
		return 1
	fi

        if ! [ -x "${RBOTRUBY}" ]; then
		eerror "The configured Ruby interpreter for rbot is not an executable."
		eerror "Use \`eselect ruby' to set a default interpreter or adapt the"
		eerror "RBOTRUBY variable in /etc/conf.d/${SVCNAME}."
		return 1
	fi

	export USER="${RBOTUSER%%:*}"
	export HOME="/dev/null"
	ebegin "Starting rbot"
	start-stop-daemon \
		--start \
		--exec "${RBOTRUBY}" --name "$(basename ${RBOTRUBY})" \
		--pidfile "${RBOTDIR}/rbot.pid" \
		--chuid "${RBOTUSER}" \
		-- /usr/bin/rbot --background "${RBOTDIR}"
	eend $?
}

stop() {
	ebegin "Stopping rbot"
	start-stop-daemon --stop \
		--exec "${RBOTRUBY}" \
		--pidfile "${RBOTDIR}/rbot.pid" \
		--user "${RBOTUSER%%:*}"
	eend $?
}

# vim:set sts=8 sw=8 ts=8 noexpandtab:



1.1                  net-irc/rbot/files/rbot.conf2

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/files/rbot.conf2?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/files/rbot.conf2?rev=1.1&content-type=text/plain

Index: rbot.conf2
===================================================================
# Configuration file for rbot service(s)
# 
# To allow running more than one rbot service on your box, you can
# symlink /etc/init.d/rbot to any name starting with rbot.
# By doing this, after this configuration file, the service will
# source the relative /etc/conf.d/rbot.$name file, where you can set
# your particular configuration for that rbot instance.
#
# NOTE: please make sure you always use a different RBOTDIR for
# multiple instances; you can still use the same user though.
# Also note that, as in the home of the user there will be the
# password for both rbot and NickServ access, the directory should not
# have world readable permissions.

# Base directory for the bot, with the configuration data
RBOTDIR="/var/lib/rbot"

# User to run the rbot instance with.
# Note 1: you can specify also a group in the form of user:group.
# Note 2: the HOME of the user will be hardwired to /dev/null for
# safety.
RBOTUSER="rbot:nobody"

# The Ruby interpreter to run rbot with. Use full paths.
# This defaults to whatever is put as default by eselect ruby.
RBOTRUBY="/usr/bin/$(readlink /usr/bin/ruby)"






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

only message in thread, other threads:[~2010-07-28  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28  7:58 [gentoo-commits] gentoo-x86 commit in net-irc/rbot/files: rbot.init2 rbot.conf2 Alex Legler (a3li)

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