#!/bin/bash -ex
install()
{
    apt-get update
    DEBIAN_FRONTEND=noninteractive apt-get -y \
        -o DPkg::Options::=--force-confdef \
        -o DPkg::Options::=--force-confold \
        install $@
}

apt-get update

install  build-essential

cd

wget http://launchpad.net/plone/4.0/4.0.0/+download/Plone-4.0-UnifiedInstaller.tgz

tar xzf Plone-4.0-UnifiedInstaller.tgz

cd Plone-4.0-UnifiedInstaller

chmod +x install.sh

./install.sh standalone --password=admin

cd ..

rm -rf Plone-4.0-UnifiedInstaller

chmod +x /etc/init.d/plone.sh

update-rc.d plone.sh  defaults


