aboutsummaryrefslogtreecommitdiff
path: root/src/sshd/install.sh
diff options
context:
space:
mode:
authorJosh Spicer <joshspicer@github.com>2022-08-23 16:17:08 +0300
committerGitHub <noreply@github.com>2022-08-23 16:17:08 +0300
commit0cafeee86296b9f19e6425055e0c4037eff41985 (patch)
tree1320a7b4c79a9a676e30632117bbd5a955b673ba /src/sshd/install.sh
parent58e425039a1dc78cde64e9c1939e2a3dfed6d22a (diff)
favor correctness by removing `apt update ...` short-circuiting (#98)
* favor correctness by removing apt update shortciruiting * Update install.sh * apt_get_upadate in node * update test
Diffstat (limited to 'src/sshd/install.sh')
-rwxr-xr-xsrc/sshd/install.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sshd/install.sh b/src/sshd/install.sh
index e02ef92..25b8859 100755
--- a/src/sshd/install.sh
+++ b/src/sshd/install.sh
@@ -39,10 +39,16 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
USERNAME=root
fi
+apt_get_update()
+{
+ echo "Running apt-get update..."
+ apt-get update -y
+}
+
# Checks if packages are installed and installs them if not
check_packages() {
if ! dpkg -s "$@" > /dev/null 2>&1; then
- apt-get update -y
+ apt_get_update
apt-get -y install --no-install-recommends "$@"
fi
}