Browse Source

Fix Nginx Restart Problem And WP Command Not Found

old-stable
Mitesh Shah 12 years ago
parent
commit
b6216dbb56
  1. 30
      usr/local/sbin/easyengine

30
usr/local/sbin/easyengine

@ -193,6 +193,11 @@ WP-CLI()
echo 'source /var/www/wp-cli/vendor/wp-cli/wp-cli/utils/wp-completion.bash' \ echo 'source /var/www/wp-cli/vendor/wp-cli/wp-cli/utils/wp-completion.bash' \
>> /root/.profile >> /root/.profile
fi fi
# Add WP Command In PATH Variable
echo -e "\033[34m Add WP Command In PATH Variable \e[0m"
export PATH="/var/www/wp-cli/bin:$PATH"
fi fi
} }
@ -404,18 +409,18 @@ NGINXUSERINFO()
|| OwnError "Unable To Findout Nginx Username" || OwnError "Unable To Findout Nginx Username"
} }
NGINXRELOAD() NGINXRESTART()
{ {
# Test & Reload Nginx # Test & Reload Nginx
echo -e "\033[34m Reloading Nginx Configuration, Please Wait... \e[0m" echo -e "\033[34m Restarting Nginx Configuration, Please Wait... \e[0m"
nginx -t && service nginx reload || OwnError "Unable To Reload Nginx" nginx -t && service nginx restart || OwnError "Unable To Restart Nginx"
} }
PHPRELOAD() PHPRESTART()
{ {
# Reload PHP # Reload PHP
echo -e "\033[34m Reloading PHP5-FPM Configuration, Please Wait... \e[0m" echo -e "\033[34m Restarting PHP5-FPM Configuration, Please Wait... \e[0m"
service php5-fpm reload || OwnError "Unable To Reload PHP5-FPM" service php5-fpm restart || OwnError "Unable To Restart PHP5-FPM"
} }
@ -542,7 +547,8 @@ EEPERMISSION()
chown -R $NGINXUSER:$NGINXUSER /var/www/$DOMAIN/ || OwnError "Unable To Change Ownership For $DOMAIN" chown -R $NGINXUSER:$NGINXUSER /var/www/$DOMAIN/ || OwnError "Unable To Change Ownership For $DOMAIN"
# Reload Nginx Configuration # Reload Nginx Configuration
NGINXRELOAD echo -e "\033[34m Reloading Nginx Configuration, Please Wait... \e[0m"
nginx -t && service nginx reload || OwnError "Unable To Reload Nginx"
} }
@ -576,8 +582,8 @@ then
# Personal Settings For Nginx # Personal Settings For Nginx
COMMONNGINX COMMONNGINX
# Reload Nginx To Take Effect Of COMMONNGINX Functions # Restart Nginx To Take Effect Of COMMONNGINX Functions
NGINXRELOAD NGINXRESTART
# Initialise Git # Initialise Git
EEGITDIR=/etc/nginx/ EEGITDIR=/etc/nginx/
@ -608,7 +614,7 @@ then
CHANGEPHPSOCKET CHANGEPHPSOCKET
## Reload PHP To Take Effect Of CHANGEPHPSOCKET Functions ## Reload PHP To Take Effect Of CHANGEPHPSOCKET Functions
PHPRELOAD PHPRESTART
# Install WP-CLI # Install WP-CLI
WP-CLI WP-CLI
@ -693,13 +699,13 @@ then
COMMONNGINX COMMONNGINX
# Reload Nginx To Take Effect Of COMMONNGINX Functions # Reload Nginx To Take Effect Of COMMONNGINX Functions
NGINXRELOAD NGINXRESTART
# Change PHP Fastcgi Socket # Change PHP Fastcgi Socket
CHANGEPHPSOCKET CHANGEPHPSOCKET
## Reload PHP To Take Effect Of CHANGEPHPSOCKET Functions ## Reload PHP To Take Effect Of CHANGEPHPSOCKET Functions
PHPRELOAD PHPRESTART
# Install WP-CLI # Install WP-CLI
WP-CLI WP-CLI

Loading…
Cancel
Save