Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 760869 | Differences between
and this patch

Collapse All | Expand All

(-)a/net-irc/irker/files/irkerd.confd (-2 / +2 lines)
Lines 12-19 Link Here
12
# Debug Level (critical, error, warning, info, debug)
12
# Debug Level (critical, error, warning, info, debug)
13
# IRKERD_LOGLEVEL=""
13
# IRKERD_LOGLEVEL=""
14
14
15
# To run an anonymous irkerd safely. It should not be able
15
# To run an anonymous irkerd safely. It should not be able to write to anywhere
16
# to write to anywhere on your system
16
# on your system. If the user is undefined or empty, it defaults to "nobody".
17
# IRKERD_USER=""
17
# IRKERD_USER=""
18
18
19
# see man pages for irkerd for valid cmdline options
19
# see man pages for irkerd for valid cmdline options
(-)a/net-irc/irker/files/irkerd.initd (-16 / +14 lines)
Lines 2-33 Link Here
2
# Copyright 1999-2014 Gentoo Foundation
2
# Copyright 1999-2014 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
4
5
: ${pidfile:=/run/${RC_SVCNAME}.pid}
5
: "${pidfile:=/run/${RC_SVCNAME}.pid}"
6
6
7
: ${IRKERD_NICK:=}
7
: "${IRKERD_NICK:=}"
8
: ${IRKERD_PASSWORD:=}
8
: "${IRKERD_PASSWORD:=}"
9
: ${IRKERD_USER:=nobody}
9
: "${IRKERD_USER:=nobody}"
10
10
11
depend() {
11
depend() {
12
        use net
12
        use net
13
}
13
}
14
14
15
start () {
15
start() (
16
	if [[ ${IRKERD_LOGFILE} ]] ; then
16
	if [ -n "${IRKERD_LOGFILE}" ] ; then
17
		checkpath -f \
17
		checkpath -f \
18
			-o "${IRKERD_USER}" \
18
			-o "${IRKERD_USER}" \
19
			"${IRKERD_LOGFILE}" \
19
			"${IRKERD_LOGFILE}" \
20
			|| return 1
20
			|| return 1
21
	fi
21
	fi
22
22
23
	if [[ -z "${IRKERD_USER}" ]] ; then
23
	set -f
24
		die "IRKERD_USER is mandatory"
24
	set -- ${IRKERD_OPTS}
25
	fi
25
	[ -n "${IRKERD_LOGLEVEL}" ] && set -- "$@" -d "${IRKERD_LOGLEVEL}"
26
26
	[ -n "${IRKERD_LOGFILE}"  ] && set -- "$@" -l "${IRKERD_LOGFILE}"
27
	[[ -n "${IRKERD_LOGLEVEL}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
27
	[ -n "${IRKERD_NICK}"     ] && set -- "$@" -n "${IRKERD_NICK}"
28
	[[ -n "${IRKERD_LOGFILE}"  ]] && IRKERD_OPTS="${IRKERD_OPTS} -l ${IRKERD_LOGFILE}"
28
	[ -n "${IRKERD_PASSWORD}" ] && set -- "$@" -p "${IRKERD_PASSWORD}"
29
	[[ -n "${IRKERD_NICK}"     ]] && IRKERD_OPTS="${IRKERD_OPTS} -n ${IRKERD_NICK}"
30
	[[ -n "${IRKERD_PASSWORD}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -p ${IRKERD_PASSWORD}"
31
29
32
        ebegin "Starting ${RC_SVCNAME}"
30
        ebegin "Starting ${RC_SVCNAME}"
33
        start-stop-daemon --start \
31
        start-stop-daemon --start \
Lines 35-40 start () { Link Here
35
                --user "${IRKERD_USER}" \
33
                --user "${IRKERD_USER}" \
36
                --make-pidfile --pidfile "${pidfile}" \
34
                --make-pidfile --pidfile "${pidfile}" \
37
                --exec /usr/bin/irkerd \
35
                --exec /usr/bin/irkerd \
38
                -- ${IRKERD_OPTS} < /dev/null
36
                -- "$@" < /dev/null
39
        eend $?
37
        eend $?
40
}
38
)

Return to bug 760869