Skip to content

Commit 61f7ea6

Browse files
committed
apt-get silent mode
1 parent 77c29c6 commit 61f7ea6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

nginxSetup.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ fi
2626
# Get requiered tools
2727
case $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() {
6767
install_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

Comments
 (0)