author | Paul Crowley <paul@lshift.net> |
Fri, 02 May 2008 18:03:42 +0100 | |
changeset 30 | 98dbde5b13a1 |
parent 27 | ec31ba248edd |
child 31 | d54720d47ca2 |
permissions | -rwxr-xr-x |
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 |
|
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
5 |
ssh-add -L > first-adminkey |
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
6 |
|
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
7 |
if [ \! -s first-adminkey ] ; then |
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
8 |
echo "No key defined in ssh agent; exiting" |
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
9 |
exit -1 |
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
10 |
fi |
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
11 |
|
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
12 |
sudo adduser --system --shell /bin/sh --group --disabled-password \ |
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
13 |
--gecos "Mercurial repositories" hg |
ec31ba248edd
Installer to set things up automatically
Paul Crowley <paul@ciphergoth.org>
parents:
diff
changeset
|
14 |
sudo -u hg -H ./hginit |