summaryrefslogtreecommitdiffstats
path: root/extras/init.d/glusterd-FreeBSD.in
diff options
context:
space:
mode:
Diffstat (limited to 'extras/init.d/glusterd-FreeBSD.in')
-rw-r--r--extras/init.d/glusterd-FreeBSD.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/extras/init.d/glusterd-FreeBSD.in b/extras/init.d/glusterd-FreeBSD.in
new file mode 100644
index 00000000000..5eed6360a89
--- /dev/null
+++ b/extras/init.d/glusterd-FreeBSD.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: glusterd
+
+. /etc/rc.subr
+
+name="glusterd"
+rcvar=`set_rcvar`
+command=@prefix@/sbin/${name}
+pidfile="/var/run/${name}.pid"
+glusterd_flags="-p /var/run/${name}.pid"
+start_precmd="glusterd_prestart"
+
+glusterd_prestart()
+{
+ mkdir -p /var/lib/glusterd /var/log/glusterfs
+ return 0
+}
+
+load_rc_config $name
+run_rc_command "$1"