Merge "Ubuntu package repositories added to Fuel ISO"
[genesis.git] / fuel / build / f_isoroot / f_bootstrap / post-scripts / 03_install_repo.sh
diff --git a/fuel/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh b/fuel/build/f_isoroot/f_bootstrap/post-scripts/03_install_repo.sh
new file mode 100644 (file)
index 0000000..c077d57
--- /dev/null
@@ -0,0 +1,19 @@
+#/bin/sh
+echo "Installing pre-build repo"
+if [ ! -d /opt/opnfv/nailgun ]; then
+  echo "Error - found no repo!"
+  exit 1
+fi
+
+mkdir -p /var/www/mailgun
+mv /opt/opnfv/nailgun/* /var/www/nailgun
+if [ $? -ne 0 ]; then
+  echo "Error moving repos to their correct location!"
+  exit 1
+fi
+rmdir /opt/opnfv/nailgun
+if [ $? -ne 0 ]; then
+  echo "Error removing /opt/opnfv/nailgun directory!"
+  exit 1
+fi
+echo "Done installing pre-build repo"