2013-11-08 13:45:12 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
2014-10-04 07:48:08 -04:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
apt-get install -qq -y git make curl
|
2013-11-08 13:45:12 -08:00
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
|
|
|
|
|
|
wget http://j.mp/godeb
|
|
|
|
|
tar -zxvf ./godeb
|
|
|
|
|
./godeb install 1.1.2
|
|
|
|
|
|
2013-11-08 14:01:51 -08:00
|
|
|
export GOPATH=/root/go
|
2013-11-08 13:45:12 -08:00
|
|
|
git clone https://github.com/flynn/gitreceive-next.git
|
|
|
|
|
cd gitreceive-next && make install
|
|
|
|
|
|
|
|
|
|
ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
|
|
|
|
|
|
|
|
|
|
cat<<EOF > /etc/init/gitreceived.conf
|
|
|
|
|
start on runlevel [2345]
|
|
|
|
|
exec /usr/local/bin/gitreceived -p 2022 -n /root/.ssh/id_rsa /tmp/receiver
|
|
|
|
|
EOF
|
|
|
|
|
|
2013-11-08 14:19:30 -08:00
|
|
|
cat<<EOF > /etc/rc.local
|
|
|
|
|
curl https://raw.github.com/progrium/dokku/master/tests/ci/receiver -s > /tmp/receiver
|
|
|
|
|
chmod +x /tmp/receiver
|
2014-10-04 07:48:08 -04:00
|
|
|
EOF
|