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

Last change on this file since 2628 was 2628, checked in by broder, 15 years ago

In invirt-dev, actually call std_init so the init script does something.

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/bash
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
11
12# Author: Invirt project <invirt@mit.edu>
13
14# Do NOT "set -e"
15
16NAME=invirt-dev
17GEN_FILES=/srv/repository/conf/distributions
18
19. /lib/init/std-init.sh
20. /lib/init/gen-files.sh
21
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
29    gen_files || ret=2
30    reprepro-env export || ret=2
31    invirt-build-conf || ret=2
32    daemon -n invirt-dev-git-daemon -- git daemon \
33        --user=git \
34        --group=nogroup \
35        --syslog \
36        --verbose \
37        --reuseaddr \
38        --export-all \
39        --base-path=/srv/git \
40        /srv/git || ret=$?
41
42    return $ret
43}
44
45do_stop()
46{
47    daemon -n invirt-dev-git-daemon --stop
48    return $?
49}
50
51do_reload()
52{
53    do_start
54}
55
56std_init
Note: See TracBrowser for help on using the repository browser.