source: trunk/packages/invirt-dev/debian/invirt-dev.init @ 2636

Last change on this file since 2636 was 2636, checked in by broder, 14 years ago

Run git-daemon as an inetd service instead of a separate daemon.

git-daemon doesn't run well under daemon(1), because it forks a child
(without detaching) that does all of its work, and killing the parent
doesn't kill the child.

  • Property svn:executable set to *
File size: 944 bytes
RevLine 
[890]1#!/bin/bash
[2552]2### BEGIN INIT INFO
3# Provides:          invirt-dev
4# Required-Start:    $local_fs $remote_fs
5# Required-Stop:     $local_fs $remote_fs
6# Default-Start:     2 3 4 5
7# Default-Stop:      0 1 6
8# Short-Description: Invirt development configuration
9# Description:       
10### END INIT INFO
[853]11
[2552]12# Author: Invirt project <invirt@mit.edu>
[853]13
[2552]14# Do NOT "set -e"
[853]15
[2552]16NAME=invirt-dev
17GEN_FILES=/srv/repository/conf/distributions
[853]18
[2589]19. /lib/init/std-init.sh
[2552]20. /lib/init/gen-files.sh
21
[2589]22do_start()
23{
24    # Return
25    #  0 if daemon has been started
26    #  1 if daemon was already running
27    #  2 if daemon could not be started
28    ret=0
[2633]29
[2589]30    gen_files || ret=2
[2634]31    for d in db dists lists pool; do
32        dir="/srv/repository/$d"
[2635]33        mkdir -p "$dir"
[2634]34        chown -R repository:nogroup "$dir"
35    done
[2589]36    reprepro-env export || ret=2
[2633]37
[2589]38    invirt-build-conf || ret=2
[2633]39
[2589]40    return $ret
41}
42
43do_stop()
44{
[2636]45    :
[2589]46}
47
48do_reload()
49{
50    do_start
51}
[2628]52
[2629]53std_init "$@"
Note: See TracBrowser for help on using the repository browser.