Browse Source

Added messages for site create

old-stable
Mitesh Shah 12 years ago
parent
commit
6dcbd36b4f
  1. 7
      setup/engine

7
setup/engine

@ -358,20 +358,23 @@ then
Domain=$(echo $3 | sed "s'http://''" | sed "s'www.''") Domain=$(echo $3 | sed "s'http://''" | sed "s'www.''")
# Creating Site # Creating Site
echo "Creating $Domain, please wait..." echo -e "\033[34m Creating $Domain, please wait... \e[0m"
sed "s/example.com/$Domain/g" ../conf/nginx/basic.conf \ sed "s/example.com/$Domain/g" ../conf/nginx/basic.conf \
> /etc/nginx/sites-available/$Domain \ > /etc/nginx/sites-available/$Domain \
|| OwnError "Unable to create configuration file for $Domain" || OwnError "Unable to create configuration file for $Domain"
# Creating Symbolic Link # Creating Symbolic Link
echo -e "\033[34m Creating symbolic link \e[0m"
ln -s /etc/nginx/sites-available/$Domain /etc/nginx/sites-enabled/ \ ln -s /etc/nginx/sites-available/$Domain /etc/nginx/sites-enabled/ \
|| OwnError "Unable to create symbolic link for $Domain" || OwnError "Unable to create symbolic link for $Domain"
# Creating Htdocs & Logs Directory # Creating Htdocs & Logs Directory
echo -e "\033[34m Creating htdocs and logs directory \e[0m"
mkdir -p /var/www/$Domain/{htdocs,logs} \ mkdir -p /var/www/$Domain/{htdocs,logs} \
|| OwnError "Unable to create htdocs and logs directory" || OwnError "Unable to create htdocs and logs directory"
# Creating Symbolic Links For Logs # Creating Symbolic Links For Logs
echo -e "\033[34m Creating symbolic link for logs \e[0m"
ln -s /var/log/nginx/$Domain.{accss.log,error.log} /var/www/$Domain/logs/ \ ln -s /var/log/nginx/$Domain.{accss.log,error.log} /var/www/$Domain/logs/ \
|| OwnError "Unable to create symbolic link for $Domain logs" || OwnError "Unable to create symbolic link for $Domain logs"
@ -379,6 +382,7 @@ then
if [ "$4" = "--with-wordpress" ] if [ "$4" = "--with-wordpress" ]
then then
# Download Latest Wordpress # Download Latest Wordpress
echo -e "\033[34m Downloading wordpress \e[0m"
wget -cO /var/www/$Domain/htdocs/latest.tar.gz \ wget -cO /var/www/$Domain/htdocs/latest.tar.gz \
http://wordpress.org/latest.tar.gz http://wordpress.org/latest.tar.gz
@ -392,6 +396,7 @@ then
# Modify wp-config.php # Modify wp-config.php
# Change Ownership # Change Ownership
echo -e "\033[34m Changing ownership \e[0m"
chown -R www-data:www-data /var/www/$Domain/ chown -R www-data:www-data /var/www/$Domain/
fi fi

Loading…
Cancel
Save