round2 of gmg install
[fai-configs.git] / scripts / GMG / 15_install_gmg.sh
index 75b6a7a..8cc9d34 100755 (executable)
@@ -1,5 +1,22 @@
 #!/bin/bash
 
+# Copy configs
 fcopy -Bv /etc/init.d/install-mediagoblin
+fcopy -Bv /etc/init.d/mediagoblin-paster
+fcopy -Bv /etc/init.d/mediagoblin-celery-worker
+fcopy -Bv /etc/mediagoblin-templates/mediagolbin.ini
+fcopy -Bv /etc/nginx/sites-available/mediagoblin
+fcopy -Bv /etc/nginx/mediagoblin-common.conf
+
+# Add installer to boot
 $ROOTCMD update-rc.d install-mediagoblin defaults
-sed 's_GMG_PATH_TOKEN_'$GMG_PATH'_g' -i $target/etc/init.d/install-mediagoblin
+fqdn=$HOSTNAME.$DOMAIN
+
+# Replace Tokens
+sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/init.d/install-mediagoblin
+sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/init.d/mediagoblin-celery-worker
+sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/init.d/mediagoblin-paster
+
+sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/mediagoblin-templates/mediagolbin.ini
+sed 's^GMG_PATH_TOKEN^'$GMG_PATH'^g' -i $target/etc/ngnix/mediagoblin-common.conf
+sed 's^GMG_SENDER_TOKEN^'$GMG_SENDER'^g' -i $target/etc/mediagoblin-templates/mediagolbin.ini