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. 28
      usr/local/sbin/easyengine

28
usr/local/sbin/easyengine

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

Loading…
Cancel
Save