X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/blobdiff_plain/19faa90db18df9055561485184f2c72784be9dd7..dd31edce8851aceaaf6398136eeef8e1311d2a79:/debian/invirt-dev.init diff --git a/debian/invirt-dev.init b/debian/invirt-dev.init index fbdc103..372d8f2 100755 --- a/debian/invirt-dev.init +++ b/debian/invirt-dev.init @@ -26,26 +26,23 @@ do_start() # 1 if daemon was already running # 2 if daemon could not be started ret=0 + gen_files || ret=2 + for d in db dists lists pool; do + dir="/srv/repository/$d" + mkdir -p "$dir" + chown -R repository:nogroup "$dir" + done reprepro-env export || ret=2 + invirt-build-conf || ret=2 - daemon -n invirt-dev-git-daemon -- git daemon \ - --user=git \ - --group=nogroup \ - --syslog \ - --verbose \ - --reuseaddr \ - --export-all \ - --base-path=/srv/git \ - /srv/git || ret=$? return $ret } do_stop() { - daemon -n invirt-dev-git-daemon --stop - return $? + : } do_reload() @@ -53,4 +50,4 @@ do_reload() do_start } -std_init \ No newline at end of file +std_init "$@"