summaryrefslogtreecommitdiff
path: root/net-wireless/kismet/files/kismet.initd
blob: 000e6ea03cdf25411e0799477712d036df6aa21f (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
#!/sbin/openrc-run
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

checkconfig() {
	if [ ! -e /etc/kismet.conf ]; then
		eerror "Configuration file /etc/kismet.conf not found"
		return 1
	fi
}

start() {
	checkconfig || return 1

	ebegin "Starting kismet server"
	start-stop-daemon --start --quiet --pidfile /var/run/kismet_server.pid \
		--background --make-pidfile --exec /usr/bin/kismet_server \
		-- ${KISMET_SERVER_OPTIONS}
	eend ${?}
}

stop() {
	ebegin "Stopping kismet server"
	start-stop-daemon --stop --quiet --pidfile /var/run/kismet_server.pid
	eend ${?}
}