Skip to content

Commit ab512e1

Browse files
author
Debdut Chakraborty
committed
Small changes.
1 parent e85e422 commit ab512e1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docker-essentials/main.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
install_docker(){
3030
export DEBIAN_FRONTEND="noninteractive"
3131

32-
apt install \
32+
>/dev/null 2>&1 apt install \
3333
apt-transport-https ca-certificates \
34-
curl gnupg-agent software-properties-common -qqy >/dev/null || return $?
34+
curl gnupg-agent software-properties-common -qqy || return $?
3535

3636
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
37-
sudo apt-key add - >/dev/null || return $?
37+
sudo apt-key add - >/dev/null 2>&1 || return $?
3838

39-
>/dev/null add-apt-repository \
39+
>/dev/null 2>&1 add-apt-repository \
4040
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
4141
|| return $?
4242

@@ -50,8 +50,8 @@ docker_post_install(){
5050

5151
if [ "$DOCKER_GROUP" = "yes" ]; then
5252
usermod -aG docker $USER \
53-
&& error "$USER was'nt added to the docker group." \
54-
|| info "$USER was successfully added to the docker group."
53+
|| error "$USER wasn't added to the docker group. usermod failed." \
54+
&& info "$USER was successfully added to the docker group."
5555
fi
5656

5757
cat <<EOF >> /etc/audit/rules.d/audit.rules
@@ -74,9 +74,9 @@ EOF
7474

7575
local ret=0
7676

77-
systemctl enable docker
77+
systemctl enable docker >/dev/null
7878
ret=$(($ret+$?))
79-
systemctl enable auditd
79+
systemctl enable auditd >/dev/null
8080
return $(($ret+$?))
8181
}
8282

0 commit comments

Comments
 (0)