Browse Source

Fix dpkg -l running on every commands, Now its run with ee system commands only

old-stable
Mitesh Shah 11 years ago
parent
commit
c682db7db0
  1. 38
      usr/local/sbin/easyengine

38
usr/local/sbin/easyengine

@ -28,23 +28,6 @@ echo -e "\033[34mEasyEngine (ee) Execution Started [$(date)]\e[0m" &>> $INSTALLL
echo -e "\033[34mEasyEngine (ee) Command: $0 $@\e[0m" &>> $INSTALLLOG
# Check Auto Assume Yes Or No To Apt-Get
grep apt-get-assume-yes /etc/easyengine/ee.conf | grep -i true &>> /dev/null
if [ $? -eq 0 ]
then
EEAPTGET="apt-get -y"
else
# Check Any WebServer Package Is Installed Or Not
dpkg -l | egrep -e 'nginx|php|mysql|postfix|apache' &>> $INSTALLLOG
if [ $? -ne 0 ]
then
EEAPTGET="apt-get -y"
else
EEAPTGET="apt-get"
fi
fi
# Capture Errors
OwnError()
{
@ -52,6 +35,25 @@ OwnError()
exit 101
}
# Check Auto Assume Yes Or No To Apt-Get
APTASSUMEYES ()
{
grep apt-get-assume-yes /etc/easyengine/ee.conf | grep -i true &>> /dev/null
if [ $? -eq 0 ]
then
EEAPTGET="apt-get -y"
else
# Check Any WebServer Package Is Installed Or Not
dpkg -l | egrep -e 'nginx|php|mysql|postfix|apache' &>> $INSTALLLOG
if [ $? -ne 0 ]
then
EEAPTGET="apt-get -y"
else
EEAPTGET="apt-get"
fi
fi
}
# Install Package Functions
PYTHONSOFTWARE()
{
@ -1136,6 +1138,8 @@ then
elif [ "$1" = "system" ]
then
# Check Auto Assume Yes Or No To Apt-Get
APTASSUMEYES
# Easy Engine Install
if [ "$2" = "install" ]

Loading…
Cancel
Save