Loggerhead Init Script for Gentoo

I just set up a Bazaar repository server at work. Gentoo has no official ebuild for Loggerhead, so I installed it from Mark Lee‘s Bazaar overlay. Unfortunately, this does not ship with an init script for serve-branches, so I wrote one.

The script is /etc/init.d/loggerhead (mode 755):

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
    need net
start() {
    ebegin "Starting loggerhead"
    start-stop-daemon --start --quiet --background \
        --make-pidfile --pidfile ${PIDFILE} \
        --exec /usr/bin/serve-branches -- --log-folder=${LOGDIR} \
    eend $?
stop() {                        
    ebegin "Stopping loggerhead"
    start-stop-daemon --stop --quiet \
        --pidfile ${PIDFILE}
    eend $?                 

This uses a single entry from /etc/conf.d/loggerhead:


It seems to work. When I get the chance I may patch the ebuild to include it and suggest it to the maintainer.

Nov 12th, 2009
  1. Anonymous
    Nov 19th, 2009 at 20:17 | #1
Comments are closed.