diff options
author | mh <mh@immerda.ch> | 2009-01-08 21:18:24 +0000 |
---|---|---|
committer | mh <mh@immerda.ch> | 2009-01-08 21:18:24 +0000 |
commit | b1a06a0b09d156b029327928d4c9a177e73c4714 (patch) | |
tree | da4032320dac245e7f69b277a7ed15e00f230c63 /files | |
parent | a28669485770e6bf62adba52793b6d193ea88b76 (diff) |
run git-daemon as a user
Diffstat (limited to 'files')
-rw-r--r-- | files/init.d/git-daemon | 6 | ||||
-rw-r--r-- | files/sysconfig/git-daemon | 3 | ||||
-rw-r--r-- | files/sysconfig/git-daemon.vhosts | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/files/init.d/git-daemon b/files/init.d/git-daemon index f574480..aed2075 100644 --- a/files/init.d/git-daemon +++ b/files/init.d/git-daemon @@ -16,14 +16,16 @@ export PATH lockfile=${LOCKFILE-/var/lock/subsys/git-daemon} gitdir=${GITDIR-/srv/git} gitvhost=${GITVHOST-no} +user=${GITUSER-nobody} options=${OPTIONS-"--reuseaddr --verbose --detach"} gitdaemon=${GITDAEMON-/usr/bin/git-daemon} RETVAL=0 +gitoptions="--user=${user} ${options}" if [ $gitvhost = yes ]; then - gitoptions="${options} --interpolated-path=${gitdir}/%H/%D" + gitoptions="${gitoptions} --interpolated-path=${gitdir}/%H/%D" else - gitoptions="${options} --base-path=${gitdir}" + gitoptions="${gitoptions} --base-path=${gitdir}" fi # Source function library. diff --git a/files/sysconfig/git-daemon b/files/sysconfig/git-daemon index 92e66f2..a9b208c 100644 --- a/files/sysconfig/git-daemon +++ b/files/sysconfig/git-daemon @@ -15,6 +15,9 @@ # - /srv/git/git.example.org #GITVHOST=no +# the user git-daemon should run with +#GITUSER=nobody + # options for the daemon #OPTIONS="--reuseaddr --verbose --detach" diff --git a/files/sysconfig/git-daemon.vhosts b/files/sysconfig/git-daemon.vhosts index dce800f..62bb9d4 100644 --- a/files/sysconfig/git-daemon.vhosts +++ b/files/sysconfig/git-daemon.vhosts @@ -16,6 +16,9 @@ #GITVHOST=no GITVHOST=yes +# the user git-daemon should run with +#GITUSER=nobody + # options for the daemon #OPTIONS="--reuseaddr --verbose --detach" |