-
-
Save alexmoreno/1b7dcc77ca5f517cc2ee65a32ba9bef1 to your computer and use it in GitHub Desktop.
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
echo "Setting new site $1" | |
directory="/var/www/html/$1" | |
echo "- Creating directory $1" | |
mkdir $directory | |
echo "- Copying backup files" | |
cp ~/base/kickstart.php $directory/kickstart.php | |
cp ~/base/base3.jpa $directory/base3.jpa | |
echo "- Setting up permissions" | |
sudo chmod -R 777 $directory | |
echo "- Setting up new database $1, you'll be asked for your MySQL root's password:" | |
mysql -u root -p -e "CREATE DATABASE $1" | |
echo "- Opening your kickstart.php in default browser (actually it's chromium-browser)" | |
chromium-browser --new-window "localhost/$1/kickstart.php" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment