Browse Source

Site Enabel/Disable Features

old-stable
Mitesh Shah 12 years ago
parent
commit
c524e266f4
  1. 8
      etc/bash_completion.d/ee
  2. 27
      usr/local/sbin/easyengine

8
etc/bash_completion.d/ee

@ -41,17 +41,17 @@ EEAUTO()
site)
COMPREPLY=( $( compgen -W "list listall show info create update delete backup restore" -- $CURRENT ) )
COMPREPLY=( $( compgen -W "list listall show info create enable disable delete backup restore update" -- $CURRENT ) )
return 0
;;
show)
show|info|enable)
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-available/ -type f -printf "%P " 2>/dev/null)' -- $CURRENT ) )
return 0
;;
info)
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-available/ -type f -printf "%P " 2>/dev/null)' -- $CURRENT ) )
disable)
COMPREPLY=( $( compgen -W '$(command find /etc/nginx/sites-enabled/ -type f -printf "%P " 2>/dev/null)' -- $CURRENT ) )
return 0
;;

27
usr/local/sbin/easyengine

@ -434,7 +434,7 @@ EEDOMAINSETUP()
|| OwnError "Unable To Create Nginx Configuration File For $DOMAIN"
# Creating Symbolic Link
echo -e "\033[34m Creating Symbolic Link \e[0m"
echo -e "\033[34m Creating Symbolic Link For $DOMAIN \e[0m"
ln -s /etc/nginx/sites-available/$DOMAIN /etc/nginx/sites-enabled/ \
|| OwnError "Unable To Create Symbolic Link For $DOMAIN"
@ -1433,6 +1433,31 @@ then
fi
fi
elif [ "$2" = "enable" ]
then
# Check SITENAME Is Empty Or Not
SITENAMECHECK=$3
EESITENAME
# Creating Symbolic Link
echo -e "\033[34m Creating Symbolic Link For $DOMAIN \e[0m"
ln -s /etc/nginx/sites-available/$DOMAIN /etc/nginx/sites-enabled/ \
|| OwnError "Unable To Create Symbolic Link For $DOMAIN"
elif [ "$2" = "disable" ]
then
# Check SITENAME Is Empty Or Not
SITENAMECHECK=$3
EESITENAME
# Remove Symbolic Link
echo -e "\033[34m Removing Symbolic Link For $DOMAIN \e[0m"
rm /etc/nginx/sites-enabled/$DOMAIN \
|| OwnError "Unable To Remove Symbolic Link For $DOMAIN"
#elif [ "$2" = "delete" ]
#then

Loading…
Cancel
Save