summaryrefslogtreecommitdiff
blob: 0d025166067077e5818dcba4a251f9829e0898cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

PID_FILE="/var/run/ntlmaps.pid"

depend() {
	need net
}

start() {
	ebegin "Starting ntlmaps"
	touch ${PID_FILE}
	chown ntlmaps:ntlmaps ${PID_FILE}
	cd /var/log/ntlmaps && \
		start-stop-daemon --quiet --start --background --exec /usr/bin/python \
			--make-pidfile --pidfile ${PID_FILE} --chuid ntlmaps -- /usr/bin/ntlmaps < /dev/null && \
		sleep 1
	eend $?
}
stop() {
	ebegin "Stopping ntlmaps"
	start-stop-daemon --stop --quiet --pidfile ${PID_FILE} && \
		rm -f ${PID_FILE}
	eend $?
}