From: PHO Date: Sun, 4 Jan 2009 09:09:24 +0000 (+0900) Subject: Initial commit X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;ds=inline;p=git-rc.git Initial commit --- baeb8ed6353d02fa7c1c85be0e4ba2e8516ed51d 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"