Changeset 2636


Ignore:
Timestamp:
Dec 17, 2009, 10:07:05 PM (15 years ago)
Author:
broder
Message:

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.

Location:
trunk/packages/invirt-dev/debian
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/debian/control

    r2570 r2636  
    88Package: invirt-dev
    99Architecture: all
    10 Depends: ${shlibs:Depends}, ${misc:Depends}, dpkg-dev-el, emacs21, reprepro, apache2, postfix, screen, dh-make, fakeroot, quilt, patchutils, config-package-dev, pbuilder, equivs, invirt-base, invirt-database, remctl-server
     10Depends: ${shlibs:Depends}, ${misc:Depends}, dpkg-dev-el, emacs21, reprepro, apache2, postfix, screen, dh-make, fakeroot, quilt, patchutils, config-package-dev, pbuilder, equivs, invirt-base, invirt-database, remctl-server, update-inetd, openbsd-inetd | inet-superserver
    1111Description: Invirt build and apt server
    1212 This packages the build scripts and apt-repository configuration for Invirt.
  • trunk/packages/invirt-dev/debian/invirt-dev.init

    r2635 r2636  
    3838    invirt-build-conf || ret=2
    3939
    40     daemon -n invirt-dev-git-daemon -- git daemon \
    41         --user=git \
    42         --group=nogroup \
    43         --syslog \
    44         --verbose \
    45         --reuseaddr \
    46         --export-all \
    47         --base-path=/srv/git \
    48         /srv/git || ret=$?
    49 
    5040    return $ret
    5141}
     
    5343do_stop()
    5444{
    55     daemon -n invirt-dev-git-daemon --stop
    56     return $?
     45    :
    5746}
    5847
  • trunk/packages/invirt-dev/debian/invirt-dev.postinst

    r2630 r2636  
    2727EOF
    2828
     29        update-inetd --add \
     30            'git\tstream\ttcp\tnowait\tgit\t/usr/bin/git\tgit daemon --inetd --syslog --verbose --export-all --base-path=/srv/git /srv/git'
     31
    2932        echo "-----"
    3033        echo "invirt-dev: run"
  • trunk/packages/invirt-dev/debian/invirt-dev.prerm

    r2630 r2636  
    2020case "$1" in
    2121    remove|upgrade|deconfigure)
    22         perl -i.bak -ne 's%^### (BEGIN|END) invirt-dev\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers       
     22        [ "$1" = "remove" ] && update-inetd --disable git
     23
     24        perl -i.bak -ne 's%^### (BEGIN|END) invirt-dev\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
    2325    ;;
    2426
Note: See TracChangeset for help on using the changeset viewer.