forked from joomla/joomla-cms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored, moved everything to one shell script.
- Loading branch information
Showing
1 changed file
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,13 +1,27 @@ | |||
#!/bin/bash | #!/bin/bash | ||
#echo "This scripts does Stackato setup related to filesystem." | #echo "This scripts does Stackato setup related to filesystem." | ||
FS=$STACKATO_FILESYSTEM | |||
if [ -s "$STACKATO_FILESYSTEM"/configuration.php ] | if [ -s "$STACKATO_FILESYSTEM"/configuration.php ] | ||
then | then | ||
echo "Configuration file exists. Removing installation folder..." | echo "Configuration file exists. Removing installation folder..." | ||
rm -rf installation/ | rm -rf installation/ | ||
else | else | ||
echo "Configuration file not found. Creating..." | echo "Configuration file not found. Creating..." | ||
touch "$STACKATO_FILESYSTEM"/configuration.php | touch "$STACKATO_FILESYSTEM"/configuration.php | ||
|
|||
# create folders in the shared filesystem | |||
mkdir -p $FS/images | |||
fi | 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 | 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!" | echo "All Done!" |