From 471e9e800d978d541ea08c94d6ad1a3b69375f75 Mon Sep 17 00:00:00 2001 From: Josh Spicer Date: Mon, 15 Aug 2022 12:01:19 -0400 Subject: sshd: always run initial apt-get (#96) * sshd: always run initial apt-get * just run apt-update * move * remove whitespace --- src/sshd/install.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/sshd/install.sh') 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 } -- cgit v1.2.3