summaryrefslogtreecommitdiffstats
path: root/testing/openvswitch/ovs-controller.initd
blob: 554aebe3f2bce547d89558a2162fa494dc6a544a (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
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovs-controller,v 1.1 2012/07/18 08:41:29 dev-zero Exp $

depend() {
    need lo
}

start() {
	checkpath -d "/var/run/openvswitch" -m 0750

	ebegin "Starting Open vSwitch OpenFlow controller"
	start-stop-daemon \
		--start --quiet --pidfile "/var/run/openvswitch/ovs-controller.pid" \
		--exec /usr/bin/ovs-controller -- --pidfile --detach --monitor ${OPTIONS} ${METHODS}
	eend $?
}

stop() {
	ebegin "Stopping Open vSwitch OpenFlow controller"
	start-stop-daemon --stop --quiet --pidfile "/var/run/openvswitch/ovs-controller.pid"
	eend $?
}