Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (42 sloc) 1.565 kb
#!/bin/bash
ZOTONIC=/home/zotonic && \
SHELL=/bin/bash && \
apt-get install -y \
erlang \
erlang-src \
build-essential \
postgresql-8.4 \
imagemagick \
exif \
git && \
echo "CREATE USER zotonic WITH PASSWORD 'zotonic';
ALTER ROLE zotonic WITH CREATEDB;
CREATE DATABASE zotonic WITH OWNER = zotonic ENCODING = 'UTF8';
\c zotonic
CREATE LANGUAGE \"plpgsql\";" | su -l postgres -c psql && \
echo "# Zotonic settings
local all zotonic ident
host all zotonic 127.0.0.1/32 md5
host all zotonic ::1/128 md5" >> /etc/postgresql/8.4/main/pg_hba.conf && \
/etc/init.d/postgresql reload && \
mkdir /home/zotonic &&\
useradd -d $ZOTONIC -s /bin/bash zotonic && \
chown -R zotonic:zotonic $ZOTONIC && \
echo "git clone git://github.com/zotonic/zotonic.git zotonic && \
cd zotonic/ && \
make && \
echo export PATH=\$PATH:\$HOME/zotonic/bin > \$HOME/.profile && \
. \$HOME/.profile && \
zotonic start" | su -l zotonic && \
CONFIG=$ZOTONIC/zotonic/priv/config && \
while [ ! -f $CONFIG ]
do
sleep 2
done && \
PASSWORD=`cat $CONFIG | grep password | sed -E 's/^\s\{\s*password\s*,\s*"(.*?)".*/\1/'` && \
echo "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Zotonic has been successfully installed:
- Visit http://locahost:8000/ to see the Sites administration page
- The password for login to this page is $PASSWORD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
Jump to Line
Something went wrong with that request. Please try again.