Browse Source

Better Way To Detect Linux Distro

old-stable
Mitesh Shah 11 years ago
parent
commit
8fe7cff6a5
  1. 2
      install.sh
  2. 2
      usr/local/sbin/easyengine
  3. 4
      usr/local/sbin/eeupdate

2
install.sh

@ -3,7 +3,7 @@
# Make Variables Available For Later Use
LINUX_DISTRO=$(lsb_release -i | cut -d':' -f2 | awk '{print $1}')
LINUX_DISTRO=$(lsb_release -i |awk '{print $3}')
# Checking Linux Distro Is Ubuntu
if [ "$LINUX_DISTRO" != "Ubuntu" ] && [ "$LINUX_DISTRO" != "Debian" ]

2
usr/local/sbin/easyengine

@ -4,7 +4,7 @@
LOGDIR=/var/log/easyengine
ERRORLOG=/var/log/easyengine/error.log
INSTALLLOG=/var/log/easyengine/install.log
LINUX_DISTRO=$(lsb_release -i | cut -d':' -f2 | awk '{print $1}')
LINUX_DISTRO=$(lsb_release -i |awk '{print $3}')
EE_IP_ADDRESS=$(grep ip_address /etc/easyengine/ee.conf | cut -d'=' -f2 |sed 's/ //g' | tr ',' '\n')
# Main EasyEngine Function To Log All The Outputs

4
usr/local/sbin/eeupdate

@ -3,7 +3,7 @@
# Make Variables Available For Later Use
INSTALLLOG=/var/log/easyengine/install.log
LINUX_DISTRO=$(lsb_release -i | cut -d':' -f2 | awk '{print $1}')
LINUX_DISTRO=$(lsb_release -i |awk '{print $3}')
# Capture Errors
OwnError()
@ -487,7 +487,7 @@ EE134()
apt-get update &>> $INSTALLLOG || OwnError "Unable To Update APT Cache"
# Update Nginx
apt-get -o Dpkg::Options::="--force-confold" install nginx-custom \
apt-get -o Dpkg::Options::="--force-confold" -y install nginx-custom \
|| OwnError "Unable To Update Nginx"
fi
}

Loading…
Cancel
Save