X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fsv%2Fgit-daemon%2Frun;h=3af0062a0b2592ec8edf64652efdcc54e1243baf;hp=05140d7b256df6e3b068d5bf0ee4074fa8d0d50d;hb=b7595a000cae850e0702938336ce116376bc7d67;hpb=e61ce31922a217eafcaa2a2d05d906f9032133e9 diff --git a/etc/sv/git-daemon/run b/etc/sv/git-daemon/run index 05140d7..3af0062 100755 --- a/etc/sv/git-daemon/run +++ b/etc/sv/git-daemon/run @@ -1,12 +1,14 @@ -#!/bin/sh -efux +#!/bin/sh -eux exec 2>&1 +sv=${PWD#/etc/sv/} +eval "home=~$sv" exec /usr/bin/chpst \ - -u git-daemon:git-daemon \ - /usr/bin/git daemon \ - --base-path=/home/git/pub \ + -u "$sv":"$sv":git-data \ + /usr/lib/git-core/git-daemon \ + --base-path="$home" \ --interpolated-path=/home/git/srv/%H%D \ --reuseaddr \ --user-path=pub/git \ --verbose \ -- \ - /home/git/pub/git + "$home"