diff options
author | Josh Spicer <joshspicer@github.com> | 2022-08-15 19:01:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 19:01:19 +0300 |
commit | 471e9e800d978d541ea08c94d6ad1a3b69375f75 (patch) | |
tree | 32ec70295eb8230386bfdc25598ab5ca5c0c8e75 /src/sshd | |
parent | 255d403f593dd968f8dee9b38ab6345ddf34bd0a (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')
-rw-r--r-- | src/sshd/devcontainer-feature.json | 2 | ||||
-rwxr-xr-x | src/sshd/install.sh | 13 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/sshd/devcontainer-feature.json b/src/sshd/devcontainer-feature.json index c21a4f7..32b2b12 100644 --- a/src/sshd/devcontainer-feature.json +++ b/src/sshd/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "sshd", - "version": "1.0.0", + "version": "1.0.1", "name": "SSH server", "description": "Adds a SSH server into a container so that you can use an external terminal, sftp, or SSHFS to interact with it.", "options": { 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 } |