aboutsummaryrefslogtreecommitdiff
path: root/src/sshd/install.sh
diff options
context:
space:
mode:
authorJosh Spicer <joshspicer@github.com>2022-08-15 19:01:19 +0300
committerGitHub <noreply@github.com>2022-08-15 19:01:19 +0300
commit471e9e800d978d541ea08c94d6ad1a3b69375f75 (patch)
tree32ec70295eb8230386bfdc25598ab5ca5c0c8e75 /src/sshd/install.sh
parent255d403f593dd968f8dee9b38ab6345ddf34bd0a (diff)
sshd: always run initial apt-get (#96)
* sshd: always run initial apt-get * just run apt-update * move * remove whitespace
Diffstat (limited to 'src/sshd/install.sh')
-rwxr-xr-xsrc/sshd/install.sh13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/sshd/install.sh b/src/sshd/install.sh
index 4ee7893..e02ef92 100755
--- a/src/sshd/install.sh
+++ b/src/sshd/install.sh
@@ -39,21 +39,10 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
USERNAME=root
fi
-# Function to run apt-get if needed
-apt_get_update_if_needed()
-{
- if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
- echo "Running apt-get update..."
- apt-get update
- else
- echo "Skipping apt-get update."
- fi
-}
-
# Checks if packages are installed and installs them if not
check_packages() {
if ! dpkg -s "$@" > /dev/null 2>&1; then
- apt_get_update_if_needed
+ apt-get update -y
apt-get -y install --no-install-recommends "$@"
fi
}