author | Paul Crowley <paul@lshift.net> |
Wed, 02 Dec 2009 18:29:26 +0000 | |
branch | debian |
changeset 233 | 60c2d676a754 |
parent 224 | caf9cb61f856 |
child 291 | 32dba1a70a54 |
permissions | -rw-r--r-- |
97 | 1 |
#!/bin/sh |
2 |
# postinst script for mercurial-server |
|
3 |
||
4 |
set -e |
|
5 |
||
224
caf9cb61f856
Purge repositories if debconf says so.
Paul Crowley <paul@lshift.net>
parents:
116
diff
changeset
|
6 |
# Load debconf |
caf9cb61f856
Purge repositories if debconf says so.
Paul Crowley <paul@lshift.net>
parents:
116
diff
changeset
|
7 |
. /usr/share/debconf/confmodule |
97 | 8 |
|
9 |
case "$1" in |
|
224
caf9cb61f856
Purge repositories if debconf says so.
Paul Crowley <paul@lshift.net>
parents:
116
diff
changeset
|
10 |
configure|reconfigure) |
116
d99f3169828a
Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents:
97
diff
changeset
|
11 |
if ! getent passwd hg >/dev/null; then |
d99f3169828a
Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents:
97
diff
changeset
|
12 |
adduser --disabled-password --quiet --system \ |
d99f3169828a
Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents:
97
diff
changeset
|
13 |
--shell /bin/sh --group \ |
d99f3169828a
Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents:
97
diff
changeset
|
14 |
--home /var/lib/mercurial-server \ |
d99f3169828a
Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents:
97
diff
changeset
|
15 |
--gecos "Mercurial repositories" hg |
d99f3169828a
Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents:
97
diff
changeset
|
16 |
su -c "/usr/share/mercurial-server/init/hginit /usr/share/mercurial-server" hg |
d99f3169828a
Looks like the start of a working Debianization
Paul Crowley <paul@lshift.net>
parents:
97
diff
changeset
|
17 |
fi |
97 | 18 |
;; |
19 |
||
20 |
abort-upgrade|abort-remove|abort-deconfigure) |
|
21 |
;; |
|
22 |
||
23 |
*) |
|
24 |
echo "postinst called with unknown argument \`$1'" >&2 |
|
25 |
exit 1 |
|
26 |
;; |
|
27 |
esac |
|
28 |
||
29 |
# dh_installdeb will replace this with shell code automatically |
|
30 |
# generated by other debhelper scripts. |
|
31 |
||
32 |
#DEBHELPER# |
|
33 |
||
34 |
exit 0 |
|
35 |