blob: 10aa4f0f3cadee85cbe3b9802d5ac45f14168e36 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash -e
# This script is manually invoked when first setting up a site to initialize the
# gitolite repositories database and set up a user-supplied pubkey for initial
# administrator access.
echo -e "This will erase data in the gitolite repository volume!"
echo -e "One SSH pubkey will be used as the initial administrator of the new install."
echo -e "\nKey selected: $1"
cat "/tmp/$1"
echo -ne "\nEnter 'YES' to continue: "
read -r confirm
if [ "$confirm" != "YES" ]; then
echo "ABORTING!"
exit 0
fi
rm -rf /git/.gitolite /git/repositories/*
su git -c "gitolite setup -pk /tmp/$1"
|