roucaries bastien <[email protected]> (15/01/2009): > I believe that this package provide the standalone daemon because it > wrote to /etc/init.d :(
BTW, if you want a skeleton for an init.d script, please find one attached. I've written (and then rewritten because mine was trashed when I wanted to check something with that stupid package) it for local use, so it's not perfect at all, no start-stop-daemon use, no LSB headers, but well, you get the idea. Mraw, KiBi.
#!/bin/sh
set -e
# Configuration variables:
USER=gitosis
GROUP=gitosis
REPOSITORIES=/home/gitosis/repositories
# Convenience:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
do_start() {
git-daemon \
--user=$USER --group=$GROUP \
--syslog \
--reuseaddr \
--base-path=$REPOSITORIES \
$REPOSITORIES &
}
do_stop() {
killall git-daemon || true
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
restart)
do_stop
sleep 1
do_start
;;
*)
echo "Unsupported action: $1"
exit 1
;;
esac
signature.asc
Description: Digital signature

