# HG changeset patch # User Pascal Bellard # Date 1329580202 -3600 # Node ID 5dfd3ce5f96bf3cec3da9d3ffe48cd65d51dab03 # Parent 5d74983842dbad473dd902ff8beb3366b385cbdf git: update start script diff -r 5d74983842db -r 5dfd3ce5f96b git/receipt --- a/git/receipt Sat Feb 18 16:12:24 2012 +0100 +++ b/git/receipt Sat Feb 18 16:50:02 2012 +0100 @@ -43,6 +43,7 @@ local root root=$1 if ! grep -q 'GIT_OPTIONS' $root/etc/daemons.conf; then + mkdir $root/var/www/git echo '# Git daemon options.' >> $root/etc/daemons.conf echo 'GIT_REPO="/var/www/git/"' >> $root/etc/daemons.conf echo 'GIT_OPTIONS="--detach --syslog --verbose --base-path=$GIT_REPO $GIT_REPO"' >> $root/etc/daemons.conf diff -r 5d74983842db -r 5dfd3ce5f96b git/stuff/git-daemon --- a/git/stuff/git-daemon Sat Feb 18 16:12:24 2012 +0100 +++ b/git/stuff/git-daemon Sat Feb 18 16:50:02 2012 +0100 @@ -16,7 +16,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE git-daemon ; then echo "$NAME already running." exit 1 fi @@ -25,7 +25,7 @@ status ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE git-daemon ; then echo "$NAME is not running." exit 1 fi @@ -34,7 +34,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE git-daemon ; then echo "$NAME is not running." exit 1 fi