Skip to content

Commit 77e6175

Browse files
committed
Debian 7.0 Test Successful #86
1 parent cacd59b commit 77e6175

File tree

2 files changed

+54
-15
lines changed

2 files changed

+54
-15
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
# Checking Linux Distro Is Ubuntu
6-
if [ ! -f /etc/lsb-release ]
6+
if [ ! -f /etc/lsb-release ] && [ ! -f /etc/debian_version ]
77
then
88
echo -e "\033[31mEasyEngine (ee) Is Made For Ubuntu Only As Of Now\e[0m"
99
echo -e "\033[31mYou Are Free To Fork EasyEngine (ee): https://github.com/rtCamp/easyengine/fork\e[0m"

usr/local/sbin/easyengine

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,46 @@ PYTHONSOFTWARE()
5353

5454
NGINXREPO()
5555
{
56-
# Add Nginx Launchpad Repository
57-
echo -e "\033[34mAdding Brianmercer Nginx Launchpad Repository, Please Wait...\e[0m"
58-
sudo add-apt-repository -y ppa:brianmercer/nginx &>> $INSTALLLOG \
59-
|| OwnError "Unable To Add Nginx Launchpad Repository"
56+
if [ -f /etc/lsb-release ]
57+
then
58+
# Add Nginx Launchpad Repository
59+
echo -e "\033[34mAdding Brianmercer Nginx Launchpad Repository, Please Wait...\e[0m"
60+
sudo add-apt-repository -y ppa:brianmercer/nginx &>> $INSTALLLOG \
61+
|| OwnError "Unable To Add Nginx Launchpad Repository"
62+
63+
elif [ -f /etc/debian_version ]
64+
then
65+
# Add Nginx DotDeb Repository
66+
echo -e "\033[34mAdding Nginx DotDeb Repository, Please Wait...\e[0m"
67+
echo "deb http://packages.dotdeb.org $(lsb_release -c | awk '{print($2)}') all" > /etc/apt/sources.list.d/dotdeb-$(lsb_release -c | awk '{print($2)}').list \
68+
|| OwnError "Unable To Add Nginx DotDeb Repository"
69+
70+
# Fetch And Install The GnuPG Key
71+
wget -qcO /tmp/dotdeb.gpg http://www.dotdeb.org/dotdeb.gpg
72+
apt-key add /tmp/dotdeb.gpg
73+
fi
6074
}
6175

6276
PHPREPO()
6377
{
64-
# Add PHP Launchpad Repository
65-
echo -e "\033[34mAdding Ondrej PHP5 Launchpad Repository, Please Wait...\e[0m"
66-
sudo add-apt-repository -y ppa:ondrej/php5 &>> $INSTALLLOG \
67-
|| OwnError "Unable To Add PHP5 Launchpad Repository"
78+
if [ -f /etc/lsb-release ]
79+
then
80+
# Add PHP Launchpad Repository
81+
echo -e "\033[34mAdding Ondrej PHP5 Launchpad Repository, Please Wait...\e[0m"
82+
sudo add-apt-repository -y ppa:ondrej/php5 &>> $INSTALLLOG \
83+
|| OwnError "Unable To Add PHP5 Launchpad Repository"
84+
85+
elif [ -f /etc/debian_version ]
86+
then
87+
# Add PHP DotDeb Repository
88+
echo -e "\033[34mAdding PHP5 DotDeb Repository, Please Wait...\e[0m"
89+
echo "deb http://packages.dotdeb.org $(lsb_release -c | awk '{print($2)}'-php55) all" > /etc/apt/sources.list.d/dotdeb-$(lsb_release -c | awk '{print($2)}')-php55.list \
90+
|| OwnError "Unable To Add PHP5 DotDeb Repository"
91+
92+
# Fetch And Install The GnuPG Key
93+
wget -qcO /tmp/dotdeb.gpg http://www.dotdeb.org/dotdeb.gpg
94+
apt-key add /tmp/dotdeb.gpg
95+
fi
6896
}
6997

7098
GPGKEY()
@@ -98,7 +126,7 @@ INSTALLNGINX()
98126
{
99127
# Install Nginx
100128
echo -e "\033[34mInstalling Nginx, Please Wait...\e[0m"
101-
sudo $EEAPTGET install nginx-custom || OwnError "Unable To Install Nginx"
129+
sudo $EEAPTGET install $NGINXPACKAGE || OwnError "Unable To Install Nginx"
102130
}
103131

104132
EEMD5SUM()
@@ -364,7 +392,7 @@ INSTALLALL()
364392

365393
# Install Nginx PHP5 MySQL Postfix
366394
echo -e "\033[34mInstalling Nginx PHP5 MySQL Postfix, Please Wait...\e[0m"
367-
sudo $EEAPTGET install nginx-custom php5-common php5-mysqlnd php5-xmlrpc \
395+
sudo $EEAPTGET install $NGINXPACKAGE php5-common php5-mysqlnd php5-xmlrpc \
368396
php5-curl php5-gd php5-cli php5-fpm php5-imap php5-mcrypt \
369397
php5-memcache memcached mysql-server mysqltuner postfix \
370398
|| OwnError "Unable To Install Nginx PHP5 MySQL Postfix"
@@ -376,7 +404,7 @@ REMOVENGINX()
376404
{
377405
# Remove Nginx
378406
echo -e "\033[34mRemoving Nginx, Please Wait...\e[0m"
379-
sudo $EEAPTGET remove nginx-custom nginx-common || OwnError "Unable To Remove Nginx"
407+
sudo $EEAPTGET remove $NGINXPACKAGE nginx-common || OwnError "Unable To Remove Nginx"
380408
}
381409

382410
REMOVEPHP()
@@ -421,7 +449,7 @@ REMOVEALL()
421449
{
422450
# Remove Nginx PHP5 MySQL Postfix
423451
echo -e "\033[34mRemoving Nginx PHP5 MySQL Postfix, Please Wait...\e[0m"
424-
sudo $EEAPTGET remove nginx-custom nginx-common php5-common php5-mysqlnd php5-xmlrpc \
452+
sudo $EEAPTGET remove $NGINXPACKAGE nginx-common php5-common php5-mysqlnd php5-xmlrpc \
425453
php5-curl php5-gd php5-cli php5-fpm php5-imap php5-mcrypt \
426454
php5-memcache memcached mysql-server mysqltuner postfix \
427455
|| OwnError "Unable To Remove Nginx PHP5 MySQL Postfix"
@@ -440,7 +468,7 @@ PURGENGINX()
440468
{
441469
# Purge Nginx
442470
echo -e "\033[34mPurge Nginx, Please Wait...\e[0m"
443-
sudo $EEAPTGET purge nginx-custom nginx-common || OwnError "Unable To Purge Nginx"
471+
sudo $EEAPTGET purge $NGINXPACKAGE nginx-common || OwnError "Unable To Purge Nginx"
444472
}
445473

446474
PURGEPHP()
@@ -471,7 +499,7 @@ PURGEALL()
471499
{
472500
# Purge Nginx PHP5 MySQL Postfix
473501
echo -e "\033[34mRemoving Nginx PHP5 MySQL Postfix, Please Wait...\e[0m"
474-
sudo $EEAPTGET purge nginx-custom nginx-common php5-common php5-mysqlnd php5-xmlrpc \
502+
sudo $EEAPTGET purge $NGINXPACKAGE nginx-common php5-common php5-mysqlnd php5-xmlrpc \
475503
php5-curl php5-gd php5-cli php5-fpm php5-imap php5-mcrypt \
476504
php5-memcache memcached mysql-server mysqltuner postfix \
477505
|| OwnError "Unable To Purge Nginx PHP5 MySQL Postfix"
@@ -1206,6 +1234,17 @@ then
12061234
# Check Auto Assume Yes Or No To Apt-Get
12071235
APTASSUMEYES
12081236

1237+
# Define Nginx Package
1238+
if [ -f /etc/lsb-release ]
1239+
then
1240+
NGINXPACKAGE=nginx-custom
1241+
1242+
elif [ -f /etc/debian_version ]
1243+
then
1244+
NGINXPACKAGE=nginx-full
1245+
fi
1246+
1247+
12091248
# Easy Engine Install
12101249
if [ "$2" = "install" ]
12111250
then

0 commit comments

Comments
 (0)