round2 of gmg install
[fai-configs.git] / scripts / GMG / 15_install_gmg.sh
index fc60f11..8cc9d34 100755 (executable)
@@ -1,17 +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
 
-cd $target/$GMG_PATH
-if [ ! -d mediagoblin ]; then
+# Add installer to boot
+$ROOTCMD update-rc.d install-mediagoblin defaults
+fqdn=$HOSTNAME.$DOMAIN
 
-    $ROOTCMD git clone git://git.savannah.gnu.org/mediagoblin.git -b stable
-    $ROOTCMD cd mediagoblin
-    $ROOTCMD git submodule init && $ROOTCMD git submodule update
-
-
-    $ROOTCMD ./bootstrap.sh && $ROOTCMD ./configure && $ROOTCMD make
-    $ROOTCMD mkdir user_dev && $ROOTCMD chmod 750 user_dev
-    $ROOTCMD ./bin/easy_install flup
-
-fi
+# 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