2013-10-29 21:13:07 +01:00
|
|
|
#!/bin/bash -xe
|
|
|
|
|
|
|
|
# Assumes we've already been untarred
|
|
|
|
|
|
|
|
apt-get update
|
|
|
|
apt-get -y dist-upgrade
|
|
|
|
apt-get install -y puppet git
|
2013-10-30 20:54:23 +01:00
|
|
|
cp -a /root/zulip/puppet/zulip/files/puppet.conf /etc/puppet/
|
2013-10-29 21:13:07 +01:00
|
|
|
|
2013-11-01 00:00:30 +01:00
|
|
|
mkdir /etc/zulip
|
|
|
|
echo -e "[machine]\npuppet_classes = zulip::local_server" > /etc/zulip/zulip.conf
|
|
|
|
/root/zulip/scripts/zulip-puppet-apply -f
|
2013-11-05 19:30:24 +01:00
|
|
|
|
2013-10-29 21:13:07 +01:00
|
|
|
cp -a /root/zulip /home/zulip/zulip
|
|
|
|
chown -R zulip:zulip /home/zulip/zulip
|
|
|
|
|
|
|
|
# These server restarting bits should be moveable into puppet-land, ideally
|
|
|
|
apt-get -y upgrade
|
|
|
|
if [ -e "/etc/init.d/nginx" ]; then
|
|
|
|
service nginx restart
|
|
|
|
fi
|
|
|
|
if [ -e "/etc/init.d/apache2" ]; then
|
|
|
|
service apache2 restart
|
|
|
|
fi
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
set +x
|
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
Done.
|
|
|
|
|
|
|
|
Now do the next step!
|
|
|
|
|
|
|
|
EOF
|