Skip to content

Commit

Permalink
Refactored, moved everything to one shell script.
Browse files Browse the repository at this point in the history
  • Loading branch information
shsu committed Sep 28, 2012
1 parent 3f82fc2 commit 0414509
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion 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.