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

Collapse All | Expand All

(-)/etc/init.d/twistd (-8 / +10 lines)
Lines 1-5 Link Here
1
#!/sbin/runscript
1
#!/sbin/runscript
2
2
3
: ${TWISTD_PIDFILE:='/var/run/${RC_SVCNAME}.pid'}
4
3
depend() {
5
depend() {
4
	need net
6
	need net
5
}
7
}
Lines 7-25 Link Here
7
start() {
9
start() {
8
	if [[ -z "${TWISTD_OPTS}" ]]; then
10
	if [[ -z "${TWISTD_OPTS}" ]]; then
9
		eerror "TWISTD_OPTS is not set!"
11
		eerror "TWISTD_OPTS is not set!"
10
		eerror "You need to configure twistd in /etc/conf.d/twistd."
12
		eerror "You need to configure twistd in /etc/conf.d/${RC_SVCNAME}"
11
		return 1
13
		return 1
12
	fi
14
	fi
13
	export PYTHONPATH
15
	export PYTHONPATH
14
	ebegin "Starting twistd"
16
	ebegin "Starting ${RC_SVCNAME}"
15
	start-stop-daemon --start --quiet --pidfile /var/run/twistd.pid \
17
	start-stop-daemon --start --quiet --pidfile ${TWISTD_PIDFILE} \
16
		--exec /usr/bin/twistd -- --pidfile /var/run/twistd.pid \
18
		--exec /usr/bin/twistd -- --pidfile ${TWISTD_PIDFILE} \
17
			${TWISTD_OPTS}
19
			${TWISTD_OPTS}
18
	eend $? "Failed to start twistd"
20
	eend $? "Failed to start ${RC_SVCNAME}"
19
}
21
}
20
22
21
stop() {
23
stop() {
22
	ebegin "Stopping twistd"
24
	ebegin "Stopping ${RC_SVCNAME}"
23
	start-stop-daemon --stop --quiet --pidfile /var/run/twistd.pid 
25
	start-stop-daemon --stop --quiet --pidfile ${TWISTD_PIDFILE} 
24
	eend $? "Failed to stop twistd"
26
	eend $? "Failed to stop ${RC_SVCNAME}"
25
}
27
}

Return to bug 263687