added sql to move to utf8
[fai-configs.git] / files / etc / init.d / install-mediagoblin / DEFAULT
CommitLineData
0fe7460b
LMM
1#/bin/bash
2
e101f210 3cd GMG_PATH_TOKEN
0fe7460b
LMM
4if [ ! -d mediagoblin ]; then
5
6 # Create the GMG user
fd13c219
LMM
7 sudo -u poostgres psql -c "UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1'"
8 sudo -u poostgres psql -c "DROP DATABASE template1"
9 sudo -u poostgres psql -c "CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING='UNICODE' LC_COLLATE='en_US.UTF8' LC_CTYPE='en_US.UTF8'"
10 sudo -u poostgres psql -c "UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'"
11 sudo -u poostgres psql -c "UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template1'"
12
0fe7460b
LMM
13 sudo -u postgres createuser -A -D mediagoblin
14 # Crea te GMG database
15 sudo -u postgres createdb -E UNICODE -O mediagoblin mediagoblin
16
17 git clone git://git.savannah.gnu.org/mediagoblin.git -b stable
18
19 cd mediagoblin
20 git submodule init && git submodule update
21
22 ./bootstrap.sh && ./configure && make
23 mkdir user_dev && chmod 750 user_dev
24 ./bin/easy_install flup
25
26fi