Browse Source

Merge branch 'master' into doctor

old-stable
Mitesh Shah 11 years ago
parent
commit
d8170bcd3f
  1. 13
      README.md
  2. 9
      etc/bash_completion.d/ee
  3. 2
      etc/nginx/conf.d/fastcgi.conf
  4. 40
      usr/local/sbin/easyengine
  5. 2
      usr/local/sbin/eeupdate
  6. 2
      usr/share/easyengine/nginx/html/basic.conf
  7. 2
      usr/share/easyengine/nginx/mysql/basic.conf
  8. 2
      usr/share/easyengine/nginx/php/basic.conf
  9. 4
      usr/share/easyengine/nginx/wp/basic.conf
  10. 4
      usr/share/easyengine/nginx/wp/w3tc.conf
  11. 4
      usr/share/easyengine/nginx/wp/wpfc.conf
  12. 4
      usr/share/easyengine/nginx/wp/wpsc.conf
  13. 4
      usr/share/easyengine/nginx/wpsubdir/basic.conf
  14. 4
      usr/share/easyengine/nginx/wpsubdir/w3tc.conf
  15. 4
      usr/share/easyengine/nginx/wpsubdir/wpfc.conf
  16. 4
      usr/share/easyengine/nginx/wpsubdir/wpsc.conf
  17. 4
      usr/share/easyengine/nginx/wpsubdomain/basic.conf
  18. 4
      usr/share/easyengine/nginx/wpsubdomain/w3tc.conf
  19. 4
      usr/share/easyengine/nginx/wpsubdomain/wpfc.conf
  20. 4
      usr/share/easyengine/nginx/wpsubdomain/wpsc.conf

13
README.md

@ -26,7 +26,7 @@ ee site create example.com --wp # create example.com and instal
ee update
```
## Site Creation Commands
## More Site Creation Commands
### Standard WordPress Sites
@ -62,6 +62,17 @@ ee site create example.com --php # create example.com with php support
ee site create example.com --mysql # create example.com with php & mysql support
```
## Cheatsheet - Site creation
| | Single Site | Multisite w/ Subdir | Multisite w/ Subdom |
|--------------------|---------------|-----------------------|-----------------------|
| **NO Cache** | --wp | --wpsubdir | --wpsubdom |
| **WP Super Cache** | --wpsc | --wpsubdir --wpsc | --wpsubdom --wpsc |
| **W3 Total Cache** | --w3tc | --wpsubdir --w3tc | --wpsubdom --w3tc |
| **Nginx cache** | --wpfc | --wpsubdir --wpfc | --wpsubdom --wpfc |
## Useful Links
- [Documentation] (http://rtcamp.com/easyengine/docs/)
- [FAQ] (http://rtcamp.com/easyengine/faq/)

9
etc/bash_completion.d/ee

@ -33,7 +33,7 @@ EEAUTO()
;;
site)
COMPREPLY=( $( compgen -W "list show info create enable disable delete" -- $CURRENT ) )
COMPREPLY=( $( compgen -W "list show info create enable disable delete edit" -- $CURRENT ) )
return 0
;;
@ -54,6 +54,13 @@ EEAUTO()
fi
return 0
;;
edit)
if [ "$EECOMMON" = "site" ]
then
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-available/ -type f -printf "%P " 2>/dev/null)' -- $CURRENT ) )
fi
return 0
;;
disable)
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-enabled/ -type l -printf "%P " 2>/dev/null)' -- $CURRENT ) )

2
etc/nginx/conf.d/fastcgi.conf

@ -1,4 +1,4 @@
# Fastcgi Cahe Settings
# Fastcgi Cache Settings
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:50m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

40
usr/local/sbin/easyengine

@ -651,7 +651,7 @@ EEGITINIT()
fi
# Check For Untracked Files
git status | grep clean
git status | grep clean &>> $INSTALLLOG
if [ $? -ne 0 ]
then
# Add Files In Git Version Control
@ -663,7 +663,7 @@ EEGITINIT()
EEGITCOMMIT()
{
cd $EEGITDIR || OwnError "Unable To Change Directory $EEGITDIR"
git status | grep --color=auto clean
git status | grep clean &>> $INSTALLLOG
if [ $? -ne 0 ]
then
@ -963,6 +963,12 @@ EESITEINFO()
echo -e "\033[34m$DOMAIN Database:\t\t \033[37m$WPDBNAME\e[0m"
}
EESITEEDIT()
{
# Open Website In Default Editor
sensible-editor /etc/nginx/sites-available/$DOMAIN 2> /dev/null
}
NGINXBUCKETSIZE()
{
nginx -t 2>&1 | grep server_names_hash_bucket_size &>> $INSTALLLOG
@ -1069,7 +1075,7 @@ POSTFIXRESTART()
# EE Domian Functions
# EE Domain Functions
EESITENAME()
{
# Check SITENAME Is Empty Or Not
@ -1932,8 +1938,8 @@ then
fi
# If No Cache Specified Use --basic As Default
if [ "$WPCACHEOPTION" = "" ] && [ "$EESITECREATE" != "--html" ] && [ "$EESITECREATE" != "--php" ]
# If No Cache Specified Use --basic As Default On WordPress Sites
if [ "$WPCACHEOPTION" = "" ] && [ "$EESITECREATE" != "--html" ] && [ "$EESITECREATE" != "--php" ] && [ "$EESITECREATE" != "--mysql" ]
then
WPCACHEOPTION=--basic
fi
@ -2420,9 +2426,27 @@ then
EEGITDIR=/etc/nginx
EEGITMESSAGE="Delete Website With $SITEDELETEARG Option: $DOMAIN"
EEGITCOMMIT
fi
elif [ "$2" = "edit" ]
then
# Check SITENAME Is Empty Or Not
SITENAMECHECK=$3
EESITENAME
# Edit The Nginx Configuration For $DOMAIN
EESITEEDIT
# Reload Nginx Configuration
NGINXRELOAD
# Take Nginx Configuration In Git Version Control
EEGITDIR=/etc/nginx
EEGITMESSAGE="Edited Website: $DOMAIN"
EEGITCOMMIT
else
echo -e "\033[34mList Of Available Commands:\e[0m"
echo -e "\tinfo:\t Dispaly Information About Given Website"
@ -2431,9 +2455,9 @@ then
echo -e "\tcreate:\t Create A New HTML PHP MySQL & WordPress Website"
echo -e "\tdelete:\t Delete Existing Website"
echo -e "\tenable:\t Enable Website"
echo -e "\tdisable: Disable Website"
fi
echo -e "\tedit: Manually Edit Website"
fi
elif [ "$1" = "update" ]
then

2
usr/local/sbin/eeupdate

@ -29,7 +29,7 @@ GITCOMMIT ()
if [ $? -ne 0 ]
then
# Add Files In Git Version Control
git add . && git commit -am "$EEGITMESSAGE" &>> $INSTALLLOG \
git add --all && git commit -am "$EEGITMESSAGE" &>> $INSTALLLOG \
|| OwnError "Unable To Git Commit On $EEGITDIR"
fi
}

2
usr/share/easyengine/nginx/html/basic.conf

@ -13,6 +13,6 @@ server {
try_files $uri $uri/ /index.html;
}
include /etc/nginx/common/locations.conf;
include common/locations.conf;
}

2
usr/share/easyengine/nginx/mysql/basic.conf

@ -19,6 +19,6 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/locations.conf;
include common/locations.conf;
}

2
usr/share/easyengine/nginx/php/basic.conf

@ -19,6 +19,6 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/locations.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wp/basic.conf

@ -19,7 +19,7 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wp/w3tc.conf

@ -45,7 +45,7 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wp/wpfc.conf

@ -54,6 +54,6 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wp/wpsc.conf

@ -41,6 +41,6 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wpsubdir/basic.conf

@ -37,7 +37,7 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wpsubdir/w3tc.conf

@ -63,7 +63,7 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wpsubdir/wpfc.conf

@ -72,6 +72,6 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wpsubdir/wpsc.conf

@ -59,7 +59,7 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wpsubdomain/basic.conf

@ -25,7 +25,7 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wpsubdomain/w3tc.conf

@ -51,7 +51,7 @@ server {
fastcgi_pass php;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wpsubdomain/wpfc.conf

@ -60,6 +60,6 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

4
usr/share/easyengine/nginx/wpsubdomain/wpsc.conf

@ -50,7 +50,7 @@ server {
fastcgi_param SERVER_NAME $http_host;
}
include /etc/nginx/common/wpcommon.conf;
include /etc/nginx/common/locations.conf;
include common/wpcommon.conf;
include common/locations.conf;
}

Loading…
Cancel
Save