added line to enable nginx config
[fai-configs.git] / scripts / GMG / 15_install_gmg.sh
CommitLineData
353cecb8
LMM
1#!/bin/bash
2
cc84a658 3# Copy configs
e101f210 4fcopy -Bv /etc/init.d/install-mediagoblin
a72f8c44
LMM
5fcopy -Bv /etc/init.d/mediagoblin-paster
6fcopy -Bv /etc/init.d/mediagoblin-celery-worker
d5ce9fc0 7fcopy -Bv /etc/mediagoblin-templates/mediagoblin.ini
cc84a658
LMM
8fcopy -Bv /etc/nginx/sites-available/mediagoblin
9fcopy -Bv /etc/nginx/mediagoblin-common.conf
a72f8c44 10
cc84a658 11# Add installer to boot
bee0276b 12$ROOTCMD update-rc.d install-mediagoblin defaults
cc84a658
LMM
13fqdn=$HOSTNAME.$DOMAIN
14
15# Replace Tokens
a7362b30 16sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/init.d/install-mediagoblin
a72f8c44
LMM
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
cc84a658
LMM
19
20sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/mediagoblin-templates/mediagolbin.ini
cc84a658 21sed 's^GMG_SENDER_TOKEN^'$GMG_SENDER'^g' -i $target/etc/mediagoblin-templates/mediagolbin.ini
451a1594
LMM
22
23sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/nginx/mediagoblin-common.conf
24
196d24cd 25sed 's^GMG_FQDN_TOKEN^'$fqdn'^g' -i $target/etc/nginx/sites-available/mediagoblin.conf
451a1594 26
196d24cd
LMM
27# enable nginx config
28$ROOTCMD ln -s /etc/nginx/sites-available/mediagoblin.conf /etc/nginx/sites-enabled/mediagoblin.conf