-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcheckServer
66 lines (56 loc) · 2.22 KB
/
checkServer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
## BASHCSS
pret='\E[0;30m' # Black
verm='\E[0;31m' # Red
verd='\E[0;32m' # Green
amar='\E[0;33m' # Yellow
azul='\E[0;34m' # Blue
mage='\E[0;35m' # Magenta
cian='\e[1m' # Ciano
bran='\E[0;37m' # White
rese=$(tput sgr0) # No color.
OK="${verd}[OK]${rese}";
ATT="${amar}[!]${rese}";
FAIL="${verm}[!]${rese}";
echo " Check Server "
APACHE=$(/usr/local/apache/bin/apachectl -v|head -1|cut -d: -f2|awk '{print $1}'|cut -d/ -f2)
PHP=$(/usr/local/bin/php -v |head -1|awk '{print $2}')
PERL=$(/usr/bin/perl -v|head -n2|awk '{print $4}'|sed -e'/^$/d')
MYSQL=$(/usr/bin/mysql --version|awk '{print $5}'|sed -e 's/,//g')
CPANEL=$(/usr/local/cpanel/cpanel -V|awk '{print $1}')
#GD=$(/usr/local/bin/php -i|grep GD| grep '('|awk '{print $5}'|sed -e 's/(//g')
PERL=$(/usr/bin/perl -v|head -2|sed -e'/^$/d'|awk '{print $4}'|sed -e 's/v//g')
IONCUBE=$(/usr/local/bin/php -i|grep Cube|awk '{print $6}'|sed -e 's/v//g'|cut -d, -f1)
GNUPG=$(/usr/bin/gpg2 --version|head -1|awk '{print $3}')
#GD=$(rpm -qa|grep gd-|egrep -v "gd-devel|gd-progs"| cut -d '-' -f2)
#OPENSSL=$(/usr/bin/openssl version|awk '{print $2}'|cut -d '-' -f1|sed -e 's/e//g')
RUBY=$(/usr/bin/ruby --version|awk '{print $2}')
CURL=$(/usr/bin/curl --version|head -1|awk '{print $2}')
PERL=$(/usr/bin/perl -version| head -2|sed -e'/^$/d'|awk '{print $4}'|sed -e 's/v//g')
#PYTHON=$(rpm -qa|grep python-|egrep -v "python-[a-zA-Z]|rpm|newt|lib"|cut -d '-' -f2)
PYTHON=$(rpm -qa| python -V)
#IMAGEMAGICK=$(/usr/local/bin/php -i|grep image|awk '{print $5}'|head -1|cut -d '-' -f1)
#IMAGICKMOD=$(/usr/local/bin/php -i | grep "imagick module version" | awk '{print $5}')
#GHOSTSCRIPT=$(/usr/bin/ghostscript --version)
RSYNC=$(/usr/bin/rsync --version|head -1|awk '{print $3}')
ROUDCUBE=$(cat /var/cpanel/roundcube/version)
SQUIREMAIL=$(cat /var/cpanel/squirrelmail/version)
HORDE=$(cat /var/cpanel/horde/version)
echo -e "Apache:\t\t"${OK}$APACHE
echo -e "
PHP:\t\t$PHP
MySQL:\t\t$MYSQL
----------------------
cPanel:\t\t$CPANEL
----------------------
Perl:\t\t$PERL
IonCube:\t$IONCUBE
gnuPG:\t\t$GNUPG
----------------------
RUBY:\t\t$RUBY
Curl:\t\t$CURL
Perl:\t\t$PERL
Python:\t\t$PYTHON
---------------------
rsync:\t\t$RSYNC
RoudCube:\t$ROUDCUBE\tSquireMail:\t$SQUIREMAIL\tHorde:\t$HORDE "