aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openvswitch/ovsdb-server.initd
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2012-09-26 02:24:03 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2012-09-26 02:24:03 -0500
commitcdb36ab188ea14ae593f3a2f650540c11a201071 (patch)
treeb30620c190598f1b45207180b33edb139b1f2072 /testing/openvswitch/ovsdb-server.initd
parent5bcbfc3c6506772da405c833a726894ce0848705 (diff)
downloadaports-cdb36ab188ea14ae593f3a2f650540c11a201071.tar.gz
aports-cdb36ab188ea14ae593f3a2f650540c11a201071.tar.bz2
aports-cdb36ab188ea14ae593f3a2f650540c11a201071.tar.xz
testing/openvswitch: new aport
Diffstat (limited to 'testing/openvswitch/ovsdb-server.initd')
-rw-r--r--testing/openvswitch/ovsdb-server.initd32
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/openvswitch/ovsdb-server.initd b/testing/openvswitch/ovsdb-server.initd
new file mode 100644
index 0000000000..5eb5daf348
--- /dev/null
+++ b/testing/openvswitch/ovsdb-server.initd
@@ -0,0 +1,32 @@
+#!/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/ovsdb-server,v 1.1 2012/06/27 08:49:34 dev-zero Exp $
+
+depend() {
+ need localmount
+}
+
+start() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+
+ local remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
+ local remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
+ local private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
+ local certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
+ local bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
+
+ ebegin "Starting Open vSwitch DB server"
+ start-stop-daemon \
+ --start --quiet \
+ --pidfile "/var/run/openvswitch/ovsdb-server.pid" \
+ --exec /usr/sbin/ovsdb-server -- --pidfile --detach --monitor ${remote_punix} ${remote_db} ${private_key} ${certificate} ${bootstrap_ca_cert} ${DATABASE} ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Open vSwitch DB server"
+ start-stop-daemon --stop --quiet --pidfile "/var/run/openvswitch/ovsdb-server.pid"
+ eend $?
+}
+