install
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
refresh-auth now takes ~/.ssh/authorized_keys as an argument, and it checks that it wrote it last time before rewriting it.

#!/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