summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-09-01 14:26:03 (GMT)
committerRichard Maw <richard.maw@codethink.co.uk>2015-09-01 14:26:03 (GMT)
commit0dea2f2f62cbcb59a9b0e2818f7bbbda067afbfc (patch)
tree0f6e1321e8f76e9286fd2694f10287cbb79e2e89
parent5ad8982cfab2581d4d76e9dec9648d9307ebfe5f (diff)
downloadfirehose-master.tar.gz
Fix firehose user configHEADmaster
Change-Id: I1a17c96095bead017e7dca334d93e5b87585b920
-rw-r--r--firehose.configure10
1 files changed, 5 insertions, 5 deletions
diff --git a/firehose.configure b/firehose.configure
index 575dc1c..5cd5c5b 100644
--- a/firehose.configure
+++ b/firehose.configure
@@ -15,22 +15,22 @@ fi
# Add firehose user
chroot "$ROOT" adduser "$GERRIT_USER" -s /bin/false -D
-chroot "$ROOT" sudo -u "$GERRIT_USER" --ssh-keygen -C "$GERRIT_USER@baserock.org" -N ""
-chroot "$ROOT" sudo chown -R "$GERRIT_USER":"$GERRIT_USER" /var/lib/firehose
-cd "$ROOT/home/firehose/"
+chroot "$ROOT" sudo -u "$GERRIT_USER" ssh-keygen -C "$GERRIT_USER@baserock.org" -N ""
# Clone the Firehose repo (temporary hack)
-git clone git://git.baserock.org/baserock/baserock/firehose
+git clone git://git.baserock.org/baserock/baserock/firehose "$ROOT/home/firehose/firehose"
+cd "$ROOT/home/firehose/firehose"
# Move Firehose arguments to specific directory and timer/service
# files to /etc/systemd
mkdir -p "$ROOT/var/lib/firehose"
cp examples/*.yaml "$ROOT/var/lib/firehose/"
+chroot "$ROOT" sudo chown -R "$GERRIT_USER":"$GERRIT_USER" /var/lib/firehose
cp firehose.service "$ROOT/etc/systemd/system/firehose.service"
cp firehose.timer "$ROOT/etc/systemd/system/firehose.timer"
# Run the Firehose install script
-chroot "$ROOT" /usr/bin/python ./setup.py install
+chroot "$ROOT" sh -c 'cd /home/firehose/firehose/ && /usr/bin/python ./setup.py install' -
cat >>"$ROOT/etc/morph.conf" <<EOF
[config]