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

Collapse All | Expand All

(-)a/irker/files/irkerd.initd (-12 / +6 lines)
Lines 1-14 Link Here
1
#!/sbin/runscript
1
#!/sbin/runscript
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
# $Header: /var/cvsroot/gentoo-x86/net-irc/irker/files/irkerd.initd,v 1.1 2014/06/12 03:16:00 patrick Exp $
4
# $Header: /var/cvsroot/gentoo-x86/net-irc/irker/files/irker.init,v 1.1 2012/10/13 05:53:35 patrick Exp $
5
5
6
: ${pidfile:=/run/${RC_SVCNAME}.pid}
6
: ${pidfile:=/run/${RC_SVCNAME}.pid}
7
7
8
: ${IRKERD_NICK:=}
8
: ${IRKERD_NICK:=}
9
: ${IRKERD_PASSWORD:=}
9
: ${IRKERD_PASSWORD:=}
10
: ${IRKERD_LOGFILE:=/var/log/${RC_SVCNAME}.log}
11
: ${IRKERD_LOGLEVEL:=0}
12
: ${IRKERD_USER:=nobody}
10
: ${IRKERD_USER:=nobody}
13
11
14
depend() {
12
depend() {
Lines 16-27 depend() { Link Here
16
}
14
}
17
15
18
start () {
16
start () {
19
	if [[ ${IRKERD_LOGLEVEL} ]] ; then
17
	if [[ ${IRKERD_LOGFILE} ]] ; then
20
		IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
21
22
		ewarn "IRKERD_LOGLEVEL is intended to be used for debugging purpose only"
23
		ewarn "No logrotate can handle ${IRKERD_LOGFILE}"
24
25
		checkpath -f \
18
		checkpath -f \
26
			-o "${IRKERD_USER}" \
19
			-o "${IRKERD_USER}" \
27
			"${IRKERD_LOGFILE}" \
20
			"${IRKERD_LOGFILE}" \
Lines 32-40 start () { Link Here
32
		die "IRKERD_USER is mandatory"
25
		die "IRKERD_USER is mandatory"
33
	fi
26
	fi
34
27
35
	[[ -n "${IRKERD_LOGFILE}"  ]] && IRKERD_OPTS="${IRKERD_OPTS} -l ${IRKERD_LOGFILE}"
28
	[[ ${IRKERD_LOGLEVEL} ]] && IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
36
	[[ -n "${IRKERD_NICK}"     ]] && IRKERD_OPTS="${IRKERD_OPTS} -n ${IRKERD_NICK}"
29
	[[ ${IRKERD_LOGFILE}  ]] && IRKERD_OPTS="${IRKERD_OPTS} -l ${IRKERD_LOGFILE}"
37
	[[ -n "${IRKERD_PASSWORD}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -p ${IRKERD_PASSWORD}"
30
	[[ ${IRKERD_NICK}     ]] && IRKERD_OPTS="${IRKERD_OPTS} -n ${IRKERD_NICK}"
31
	[[ ${IRKERD_PASSWORD} ]] && IRKERD_OPTS="${IRKERD_OPTS} -p ${IRKERD_PASSWORD}"
38
32
39
        ebegin "Starting ${RC_SVCNAME}"
33
        ebegin "Starting ${RC_SVCNAME}"
40
        start-stop-daemon --start \
34
        start-stop-daemon --start \

Return to bug 538718