This commit is contained in:
Daniel Hansson 2022-05-05 11:00:32 +02:00 committed by GitHub
parent 002ff5939c
commit 2e2f4717cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
lib.sh
View File

@ -1061,7 +1061,7 @@ fi
# Check if program is installed (stop_if_installed apache2)
stop_if_installed() {
if [ "$(dpkg-query -W -f='${Status}' "${1}" 2>/dev/null | grep -c "ok installed")" == "1" ]
if [ "$(dpkg-query -W -f='${Status}' "${1}" 2>/dev/null | grep -c "ok installed")" = "1" ]
then
print_text_in_color "$IRed" "${1} is installed, it must be a clean server."
exit 1

View File

@ -20,7 +20,7 @@ then
fi
# Install curl if not existing
if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ]
if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" = "1" ]
then
echo "curl OK"
else