debian/postinst
branchdebian
changeset 224 caf9cb61f856
parent 116 d99f3169828a
child 291 32dba1a70a54
equal deleted inserted replaced
223:eb8ec32583b0 224:caf9cb61f856
     1 #!/bin/sh
     1 #!/bin/sh
     2 # postinst script for mercurial-server
     2 # postinst script for mercurial-server
     3 #
       
     4 # see: dh_installdeb(1)
       
     5 
     3 
     6 set -e
     4 set -e
     7 
     5 
     8 # summary of how this script can be called:
     6 # Load debconf
     9 #        * <postinst> `configure' <most-recently-configured-version>
     7 . /usr/share/debconf/confmodule
    10 #        * <old-postinst> `abort-upgrade' <new version>
       
    11 #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
       
    12 #          <new-version>
       
    13 #        * <postinst> `abort-remove'
       
    14 #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
       
    15 #          <failed-install-package> <version> `removing'
       
    16 #          <conflicting-package> <version>
       
    17 # for details, see http://www.debian.org/doc/debian-policy/ or
       
    18 # the debian-policy package
       
    19 
       
    20 
     8 
    21 case "$1" in
     9 case "$1" in
    22     configure)
    10     configure|reconfigure)
    23         if ! getent passwd hg >/dev/null; then
    11         if ! getent passwd hg >/dev/null; then
    24             adduser --disabled-password --quiet --system \
    12             adduser --disabled-password --quiet --system \
    25                 --shell /bin/sh --group \
    13                 --shell /bin/sh --group \
    26                 --home /var/lib/mercurial-server \
    14                 --home /var/lib/mercurial-server \
    27                 --gecos "Mercurial repositories" hg
    15                 --gecos "Mercurial repositories" hg
    43 
    31 
    44 #DEBHELPER#
    32 #DEBHELPER#
    45 
    33 
    46 exit 0
    34 exit 0
    47 
    35 
    48