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 (-17 / +12 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
: "${IRKERD_USER:=nobody}"
7
: ${IRKERD_NICK:=}
8
: ${IRKERD_PASSWORD:=}
9
: ${IRKERD_USER:=nobody}
10
7
11
depend() {
8
depend() {
12
        use net
9
        use net
13
}
10
}
14
11
15
start () {
12
start() (
16
	if [[ ${IRKERD_LOGFILE} ]] ; then
13
	if [ -n "${IRKERD_LOGFILE}" ] ; then
17
		checkpath -f \
14
		checkpath -f \
18
			-o "${IRKERD_USER}" \
15
			-o "${IRKERD_USER}" \
19
			"${IRKERD_LOGFILE}" \
16
			"${IRKERD_LOGFILE}" \
20
			|| return 1
17
			|| return 1
21
	fi
18
	fi
22
19
23
	if [[ -z "${IRKERD_USER}" ]] ; then
20
	set -f
24
		die "IRKERD_USER is mandatory"
21
	set -- ${IRKERD_OPTS}
25
	fi
22
	[ -n "${IRKERD_LOGLEVEL}" ] && set -- "$@" -d "${IRKERD_LOGLEVEL}"
26
23
	[ -n "${IRKERD_LOGFILE}"  ] && set -- "$@" -l "${IRKERD_LOGFILE}"
27
	[[ -n "${IRKERD_LOGLEVEL}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
24
	[ -n "${IRKERD_NICK}"     ] && set -- "$@" -n "${IRKERD_NICK}"
28
	[[ -n "${IRKERD_LOGFILE}"  ]] && IRKERD_OPTS="${IRKERD_OPTS} -l ${IRKERD_LOGFILE}"
25
	[ -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
26
32
        ebegin "Starting ${RC_SVCNAME}"
27
        ebegin "Starting ${RC_SVCNAME}"
33
        start-stop-daemon --start \
28
        start-stop-daemon --start \
Lines 35-40 start () { Link Here
35
                --user "${IRKERD_USER}" \
30
                --user "${IRKERD_USER}" \
36
                --make-pidfile --pidfile "${pidfile}" \
31
                --make-pidfile --pidfile "${pidfile}" \
37
                --exec /usr/bin/irkerd \
32
                --exec /usr/bin/irkerd \
38
                -- ${IRKERD_OPTS} < /dev/null
33
                -- "$@" < /dev/null
39
        eend $?
34
        eend $?
40
}
35
)

Return to bug 760869