diff --git a/misc/postinstall.sh b/misc/postinstall.sh index 1a618d4a..8e88dd4c 100755 --- a/misc/postinstall.sh +++ b/misc/postinstall.sh @@ -81,6 +81,10 @@ function stop_nginx function install_pip { + # If already installed - nothing to do + if which pip3 >/dev/null; then + return + fi source /etc/os-release if [[ "$ID" == ubuntu ]] && [[ "$VERSION_CODENAME" == bionic ]]; then @@ -110,10 +114,10 @@ function install_certbot install_pip || return # Install pip3 dependencies - /usr/local/bin/pip3 install --user --upgrade setuptools_rust certbot certbot-dns-subdomain-provider - /usr/local/bin/pip3 install --user --upgrade pip - /usr/local/bin/pip3 install --user --upgrade cryptography - /usr/local/bin/pip3 install pyopenssl --upgrade + pip3 install --user --upgrade setuptools_rust certbot certbot-dns-subdomain-provider + pip3 install --user --upgrade pip || true + pip3 install --user --upgrade cryptography + pip3 install pyopenssl --upgrade } function start_apache