From baeb8ed6353d02fa7c1c85be0e4ba2e8516ed51d Mon Sep 17 00:00:00 2001 From: PHO Date: Sun, 4 Jan 2009 18:09:24 +0900 Subject: [PATCH] Initial commit --- gitd | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 gitd diff --git a/gitd b/gitd new file mode 100755 index 0000000..3c6c2df --- /dev/null +++ b/gitd @@ -0,0 +1,34 @@ +#!/bin/sh +# +# This rc.d script is intended to be used in FreeBSD. +# +# PROVIDE: gitd +# REQUIRE: NETWORKING DAEMON + +. /etc/rc.subr + +_base_path="/home/www/git.cielonegro.org/htdocs" + +name="gitd" +rcvar=`set_rcvar` +pidfile="/var/run/${name}.pid" +procname="git-daemon" +command="/usr/pkg/bin/git" +command_args=" \ + daemon \ + --base-path=$_base_path \ + --export-all \ + --reuseaddr \ + --detach \ + --pid-file=${pidfile} \ + " +gitd_user=www +gitd_group=www + +start_precmd () { + touch ${pidfile} + chown ${gitd_user}:${gitd_group} ${pidfile} +} + +load_rc_config $name +run_rc_command "$1" -- 2.40.0