install
author Paul Crowley <paul@lshift.net>
Fri, 02 May 2008 17:33:39 +0100
changeset 29 87279134a212
parent 27 ec31ba248edd
child 31 d54720d47ca2
permissions -rwxr-xr-x
Convert PuTTY-style public keys automatically

#!/bin/sh

set -e

ssh-add -L > first-adminkey

if [ \! -s first-adminkey ] ; then
    echo "No key defined in ssh agent; exiting"
    exit -1
fi

sudo adduser --system --shell /bin/sh --group --disabled-password \
   --gecos "Mercurial repositories" hg
sudo -u hg -H ./hginit