added ngnix conf
[fai-configs.git] / scripts / GMG / 15_install_gmg.sh
... / ...
CommitLineData
1#!/bin/bash
2
3# Copy configs
4fcopy -Bv /etc/init.d/install-mediagoblin
5fcopy -Bv /etc/init.d/mediagoblin-paster
6fcopy -Bv /etc/init.d/mediagoblin-celery-worker
7fcopy -Bv /etc/mediagoblin-templates/mediagoblin.ini
8fcopy -Bv /etc/nginx/sites-available/mediagoblin
9fcopy -Bv /etc/nginx/mediagoblin-common.conf
10
11# Add installer to boot
12$ROOTCMD update-rc.d install-mediagoblin defaults
13fqdn=$HOSTNAME.$DOMAIN
14
15# Replace Tokens
16sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/init.d/install-mediagoblin
17sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/init.d/mediagoblin-celery-worker
18sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/init.d/mediagoblin-paster
19
20sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/mediagoblin-templates/mediagolbin.ini
21sed 's^GMG_SENDER_TOKEN^'$GMG_SENDER'^g' -i $target/etc/mediagoblin-templates/mediagolbin.ini
22
23sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/nginx/mediagoblin-common.conf
24
25sed 's^GMG_FQDN_TOKEN^'$fqdn'^g' -i $target/etc/nginx/sites-available/mediagoblin-common.conf
26