From ff6636ae5a205dac080d82e1a1f821653575f47e Mon Sep 17 00:00:00 2001
From: Jared Camins-Esakov <jcamins@gmail.com>
Date: Mon, 5 Jul 2010 14:14:23 -0400
Subject: [PATCH] Bug 4940: create rc.d script for running zebra

Adds a sample rc.d script for running zebra on FreeBSD. It should work unmodified on NetBSD, and possibly on OpenBSD as well.
---
 freebsd/koha_zebra |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100755 freebsd/koha_zebra

diff --git a/freebsd/koha_zebra b/freebsd/koha_zebra
new file mode 100755
index 0000000..ba16508
--- /dev/null
+++ b/freebsd/koha_zebra
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# koha_zebra - basic rc.d script for koha
+# Copyright 2010  Jared Camins-Esakov
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# PROVIDE: koha_zebra
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="koha_zebra"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+: ${koha_zebra_enable:=NO}
+: ${koha_zebra_flags:=""}
+
+command="/usr/sbin/daemon"
+command_args="-u ${koha_zebra_user} \
+        zebrasrv \
+        -v none,fatal,warn \
+        -f \"/home/${koha_zebra_user}/koha-dev/etc/koha-conf.xml\""
+
+run_rc_command "$1"
-- 
1.7.1