Browse Source

Reload nginx after enable/disable sites

old-stable
Mitesh Shah 12 years ago
parent
commit
5f7bc77ca2
  1. 16
      usr/local/sbin/easyengine

16
usr/local/sbin/easyengine

@ -392,6 +392,13 @@ NGINXUSERINFO()
|| OwnError "Unable To Findout Nginx Username"
}
NGINXRELOAD()
{
# Reload Nginx Configuration
echo -e "\033[34m Reloading Nginx Configuration, Please Wait... \e[0m"
nginx -t && service nginx reload || OwnError "Unable To Reload Nginx"
}
NGINXRESTART()
{
# Test & Reload Nginx
@ -532,8 +539,7 @@ EEPERMISSION()
chown -R $NGINXUSER:$NGINXUSER /var/www/$DOMAIN/ || OwnError "Unable To Change Ownership For $DOMAIN"
# Reload Nginx Configuration
echo -e "\033[34m Reloading Nginx Configuration, Please Wait... \e[0m"
nginx -t && service nginx reload || OwnError "Unable To Reload Nginx"
NGINXRELOAD
}
# NGINX Configuration Function
@ -1445,6 +1451,9 @@ then
ln -s /etc/nginx/sites-available/$DOMAIN /etc/nginx/sites-enabled/ \
|| OwnError "Unable To Create Symbolic Link For $DOMAIN"
# Reload Nginx Configuration
NGINXRELOAD
elif [ "$2" = "disable" ]
then
@ -1458,6 +1467,9 @@ then
rm /etc/nginx/sites-enabled/$DOMAIN \
|| OwnError "Unable To Remove Symbolic Link For $DOMAIN"
# Reload Nginx Configuration
NGINXRELOAD
#elif [ "$2" = "delete" ]
#then

Loading…
Cancel
Save