2626# Get requiered tools
2727case $OS in
2828 " Debian GNU/Linux" )
29- [ ! $( which nslookup & > /dev/null) ] && apt-get install dnsutils 1 > /dev/null
30- [ ! $( which certbot & > /dev/null) ] && apt-get install python-certbot-nginx 1 > /dev/null
29+ [ ! $( which nslookup & > /dev/null) ] && apt-get -qq install dnsutils > /dev/null
30+ [ ! $( which certbot & > /dev/null) ] && apt-get -qq install python-certbot-nginx > /dev/null
3131 ;;
3232 " Ubuntu" )
33- [ ! $( which nslookup & > /dev/null) ] && apt-get install dnsutils 1 > /dev/null
34- [ ! $( which certbot & > /dev/null) ] && apt-get install python-certbot-nginx 1 > /dev/null
33+ [ ! $( which nslookup & > /dev/null) ] && apt-get -qq install dnsutils > /dev/null
34+ [ ! $( which certbot & > /dev/null) ] && apt-get -qq install python-certbot-nginx > /dev/null
3535 ;;
3636 " CentOS Linux" )
3737 case $OS_VER in
3838 7)
39- yum -y install epel-release & > /dev/null
39+ yum -y install epel-release
4040 ;;
4141 esac
42- [ ! $( which nslookup & > /dev/null) ] && yum -y install bind-utils & > /dev/null
43- [ ! $( which certbot & > /dev/null) ] && yum -y install mod_ssl python-certbot-nginx & > /dev/null
42+ [ ! $( which nslookup & > /dev/null) ] && yum -y install bind-utils
43+ [ ! $( which certbot & > /dev/null) ] && yum -y install mod_ssl python-certbot-nginx
4444 [ ! $( which firewalld & > /dev/null) ] && {
4545 [[ ! $( firewall-cmd --list-service | grep -w " http" ) ]] && firewall-cmd --add-service http
4646 [[ ! $( firewall-cmd --list-service | grep -w " https" ) ]] && firewall-cmd --add-service https
@@ -67,15 +67,15 @@ usage() {
6767install_nginx () {
6868 case $OS in
6969 " Debian GNU/Linux" )
70- apt-get install nginx 1 > /dev/null
70+ apt-get -qq install nginx > /dev/null
7171 ;;
7272 " Ubuntu" )
73- apt-get install nginx 1 > /dev/null
73+ apt-get -qq install nginx > /dev/null
7474 ;;
7575 " CentOS Linux" )
7676 case $OS_VER in
7777 7)
78- yum -y install nginx 1> /dev/null
78+ yum -y install nginx
7979 ;;
8080 * )
8181 echo " $OS $OS_VER is not supported" 1>&2 ; exit 1;;
0 commit comments