install
author Paul Crowley <paul@lshift.net>
Fri, 06 Mar 2009 13:03:46 +0000
changeset 75 5af89523a9d3
parent 74 9d2ae2841bf2
child 76 e6a35b0f853c
permissions -rwxr-xr-x
give refreshauth.py a hook and call that in hgadmin hgrc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27
ec31ba248edd Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff changeset
     1
#!/bin/sh
ec31ba248edd Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff changeset
     2
ec31ba248edd Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff changeset
     3
set -e
ec31ba248edd Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff changeset
     4
36
b3237aabd0fe Change the name to mercurial-server
Paul Crowley <paul@lshift.net>
parents: 33
diff changeset
     5
install -o root -g root -d /usr/local/lib/mercurial-server
b3237aabd0fe Change the name to mercurial-server
Paul Crowley <paul@lshift.net>
parents: 33
diff changeset
     6
install -o root -g root -t /usr/local/lib/mercurial-server \
39
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
     7
    src/hg-ssh \
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
     8
    src/do-refresh-auth
67
fd16d9a1234b Put .py files into a directory of their own
Paul Crowley <paul@lshift.net>
parents: 59
diff changeset
     9
install -o root -g root -d /usr/local/lib/mercurial-server/mercurialserver
fd16d9a1234b Put .py files into a directory of their own
Paul Crowley <paul@lshift.net>
parents: 59
diff changeset
    10
install -o root -g root -t /usr/local/lib/mercurial-server/mercurialserver -m 644 \
fd16d9a1234b Put .py files into a directory of their own
Paul Crowley <paul@lshift.net>
parents: 59
diff changeset
    11
    src/mercurialserver/__init__.py \
70
abb9ed8972e0 Move more into hg-ssh
Paul Crowley <paul@lshift.net>
parents: 67
diff changeset
    12
    src/mercurialserver/paths.py \
67
fd16d9a1234b Put .py files into a directory of their own
Paul Crowley <paul@lshift.net>
parents: 59
diff changeset
    13
    src/mercurialserver/changes.py \
fd16d9a1234b Put .py files into a directory of their own
Paul Crowley <paul@lshift.net>
parents: 59
diff changeset
    14
    src/mercurialserver/access.py \
fd16d9a1234b Put .py files into a directory of their own
Paul Crowley <paul@lshift.net>
parents: 59
diff changeset
    15
    src/mercurialserver/servelog.py \
74
9d2ae2841bf2 Move meat of do-refresh-auth into a module
Paul Crowley <paul@lshift.net>
parents: 70
diff changeset
    16
    src/mercurialserver/refreshauth.py \
67
fd16d9a1234b Put .py files into a directory of their own
Paul Crowley <paul@lshift.net>
parents: 59
diff changeset
    17
    src/mercurialserver/ruleset.py
36
b3237aabd0fe Change the name to mercurial-server
Paul Crowley <paul@lshift.net>
parents: 33
diff changeset
    18
install -o root -g root -d /usr/local/lib/mercurial-server/init
b3237aabd0fe Change the name to mercurial-server
Paul Crowley <paul@lshift.net>
parents: 33
diff changeset
    19
install -o root -g root -t /usr/local/lib/mercurial-server/init \
39
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
    20
    src/init/hginit
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
    21
install -o root -g root -t /usr/local/lib/mercurial-server/init -m 644 \
33
18e93dbdaf12 moved stuff into subdirectories
Paul Crowley <paul@lshift.net>
parents: 32
diff changeset
    22
    src/init/hgadmin-hgrc
36
b3237aabd0fe Change the name to mercurial-server
Paul Crowley <paul@lshift.net>
parents: 33
diff changeset
    23
install -o root -g root -d /etc/mercurial-server
b3237aabd0fe Change the name to mercurial-server
Paul Crowley <paul@lshift.net>
parents: 33
diff changeset
    24
install -o root -g root -t /etc/mercurial-server \
33
18e93dbdaf12 moved stuff into subdirectories
Paul Crowley <paul@lshift.net>
parents: 32
diff changeset
    25
    src/init/conf/hg-ssh-wrapper \
39
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
    26
    src/init/conf/refresh-auth
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
    27
install -o root -g root -t /etc/mercurial-server -m 644 \
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
    28
    src/init/conf/remote-hgrc \
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
    29
    src/init/conf/access.conf
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents: 37
diff changeset
    30
install -o root -g root -d /etc/mercurial-server/keys/root
44
cf851f3ddf16 Add non-admin users to make it easier to get started
Paul Crowley <paul@lshift.net>
parents: 40
diff changeset
    31
install -o root -g root -d /etc/mercurial-server/keys/users
27
ec31ba248edd Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff changeset
    32
47
ebcc230f21e4 Fix test for user existence
Paul Crowley <paul@lshift.net>
parents: 44
diff changeset
    33
if [ x$(getent passwd hg | wc -c) = x0 ] ; then
40
abbb822779da unite install scripts
Paul Crowley <paul@lshift.net>
parents: 39
diff changeset
    34
    adduser --system --shell /bin/sh --group --disabled-password \
abbb822779da unite install scripts
Paul Crowley <paul@lshift.net>
parents: 39
diff changeset
    35
        --gecos "Mercurial repositories" hg
abbb822779da unite install scripts
Paul Crowley <paul@lshift.net>
parents: 39
diff changeset
    36
    su -c /usr/local/lib/mercurial-server/init/hginit hg
abbb822779da unite install scripts
Paul Crowley <paul@lshift.net>
parents: 39
diff changeset
    37
fi