From 71de61fd18c2e47f5fbdf4d5fdd7e4183fe2b7e7 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Mon, 20 Nov 2017 19:29:59 +0100 Subject: [PATCH] Can't put a function above the lib import duuh --- nextcloud_install_production.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index 384207e1..9116da5b 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -6,7 +6,12 @@ sed -i "s|#precedence ::ffff:0:0/96 100|precedence ::ffff:0:0/96 100|g" /etc/gai.conf # Install curl if not existing -install_if_not curl +if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ] +then + echo "curl OK" +else + apt update && apt install curl -y +fi # shellcheck disable=2034,2059 true