diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-12-08 13:01:22 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-12-08 13:01:22 +0000 |
commit | 0b0a2c117e93900891684df973d09e3a4b302fff (patch) | |
tree | 04f3f16f9b3f510be28daa40aa40afae89b58db4 /debian/userv-git-daemon.postinst | |
parent | 28b264ac22b5bb4f39920e6be74d3d59b92c9eac (diff) | |
download | userv-utils-0b0a2c117e93900891684df973d09e3a4b302fff.tar.gz |
Use dh(1). WIP.
Diffstat (limited to 'debian/userv-git-daemon.postinst')
-rwxr-xr-x | debian/userv-git-daemon.postinst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/userv-git-daemon.postinst b/debian/userv-git-daemon.postinst new file mode 100755 index 0000000..be6c934 --- /dev/null +++ b/debian/userv-git-daemon.postinst @@ -0,0 +1,35 @@ +#!/bin/sh +set -e + +# Copyright 1996-2013 Ian Jackson <ijackson@chiark.greenend.org.uk> +# Copyright 1998 David Damerell <damerell@chiark.greenend.org.uk> +# Copyright 1999,2003 +# Chancellor Masters and Scholars of the University of Cambridge +# Copyright 2010 Tony Finch <fanf@dotat.at> +# +# This file is part of userv-git-daemon, part of userv-utils +# +# This is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with userv-utils; if not, see http://www.gnu.org/licenses/. + +GITDUSER=git + +defaults=/etc/default/userv-git-daemon +if test -f $defaults; then . $defaults; fi + +if [ "$GITDUSER" ]; then + if id $GITDUSER >/dev/null 2>&1; then exit 0; fi + + adduser --system --group --gecos 'userv git daemon' \ + --home /etc/userv $GITDUSER +fi |