Skip to content
Browse files

Refactored, moved everything to one shell script.

  • Loading branch information...
1 parent 3f82fc2 commit 04145090cc25567b3bcca1062d4fc9edd961be90 @shsu shsu committed Sep 27, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −1 stackato-setup.sh
View
16 stackato-setup.sh
@@ -1,13 +1,27 @@
#!/bin/bash
#echo "This scripts does Stackato setup related to filesystem."
+FS=$STACKATO_FILESYSTEM
if [ -s "$STACKATO_FILESYSTEM"/configuration.php ]
then
echo "Configuration file exists. Removing installation folder..."
rm -rf installation/
else
echo "Configuration file not found. Creating..."
touch "$STACKATO_FILESYSTEM"/configuration.php
+
+ # create folders in the shared filesystem
+ mkdir -p $FS/images
fi
-echo "Cleaning up..."
+
+echo "Migrating data to shared filesystem..."
+cp -r images/* $FS/images
+
+echo "Symlink to files in shared filesystem..."
+rm -f configuration.php
ln -s "$STACKATO_FILESYSTEM"/configuration.php configuration.php
+
+echo "Symlink to folders in shared filesystem..."
+rm -fr images
+ln -s $FS/images images
+
echo "All Done!"

0 comments on commit 0414509

Please sign in to comment.
Something went wrong with that request. Please try again.