source:
trunk/packages/invirt-dev/debian/invirt-dev.init
@
2633
Last change on this file since 2633 was 2633, checked in by broder, 15 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[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] | 16 | NAME=invirt-dev |
17 | GEN_FILES=/srv/repository/conf/distributions | |
[853] | 18 | |
[2589] | 19 | . /lib/init/std-init.sh |
[2552] | 20 | . /lib/init/gen-files.sh |
21 | ||
[2589] | 22 | do_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 |
[2633] | 31 | chown -R repository:nogroup /srv/repository/db \ |
32 | /srv/repository/dists \ | |
33 | /srv/repository/lists \ | |
34 | /srv/repository/pool | |
[2589] | 35 | reprepro-env export || ret=2 |
[2633] | 36 | |
[2589] | 37 | invirt-build-conf || ret=2 |
[2633] | 38 | |
[2627] | 39 | daemon -n invirt-dev-git-daemon -- git daemon \ |
40 | --user=git \ | |
41 | --group=nogroup \ | |
42 | --syslog \ | |
43 | --verbose \ | |
44 | --reuseaddr \ | |
45 | --export-all \ | |
46 | --base-path=/srv/git \ | |
47 | /srv/git || ret=$? | |
[2589] | 48 | |
49 | return $ret | |
50 | } | |
51 | ||
52 | do_stop() | |
53 | { | |
[2627] | 54 | daemon -n invirt-dev-git-daemon --stop |
55 | return $? | |
[2589] | 56 | } |
57 | ||
58 | do_reload() | |
59 | { | |
60 | do_start | |
61 | } | |
[2628] | 62 | |
[2629] | 63 | std_init "$@" |
Note: See TracBrowser
for help on using the repository browser.