src/init/conf/refresh-auth
author Paul Crowley <paul@lshift.net>
Fri, 20 Feb 2009 11:37:58 +0000
changeset 47 ebcc230f21e4
parent 39 f5055ce263c7
child 50 77d97aa18f29
permissions -rwxr-xr-x
Fix test for user existence
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     1
#!/bin/sh
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     2
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     3
# This file should live in /etc/mercurial-server.
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     4
# If your repository is laid out differently you may need to modify
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     5
# this file.
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     6
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     7
set -e
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     8
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     9
if [ `whoami` != 'hg' ] ; then
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    10
    echo "Must be run as hg user"
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    11
    return -1
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    12
else
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    13
    /usr/local/lib/mercurial-server/do-refresh-auth \
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    14
        ~hg/.ssh/authorized_keys \
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    15
        /etc/mercurial-server/hg-ssh-wrapper \
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    16
        /etc/mercurial-server/keys \
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    17
        ~hg/repos/hgadmin/keys
f5055ce263c7 New system. No breaking in, just putting files in /etc/mercurial-server
Paul Crowley <paul@lshift.net>
parents:
diff changeset
    18
fi