From 87a119e37224ff0d5094ac2e692b2710da4bbaf2 Mon Sep 17 00:00:00 2001 From: Chase Wright Date: Sun, 23 Feb 2020 13:25:48 -0600 Subject: [PATCH] Switch to command -v for mysql executable check * Switch to `command -v` for mysql executable check * Add the same check to Debian --- guac-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guac-install.sh b/guac-install.sh index 671f365..7a16a8a 100644 --- a/guac-install.sh +++ b/guac-install.sh @@ -200,7 +200,7 @@ if [[ "${NAME}" == "Ubuntu" ]]; then if [ "$installMySQL" = true ]; then MYSQL="mysql-server mysql-client mysql-common mysql-utilities" # Checking if (any kind of) mysql-client or compatible command installed. This is useful for existing mariadb server - elif type "mysql" > /dev/null; then + elif [ -x "$(command -v mysql)" ]; then MYSQL="" else MYSQL="mysql-client" @@ -214,6 +214,9 @@ elif [[ "${NAME}" == *"Debian"* ]] || [[ "${NAME}" == *"Raspbian GNU/Linux"* ]]; fi if [ "$installMySQL" = true ]; then MYSQL="default-mysql-server default-mysql-client mysql-common" + # Checking if (any kind of) mysql-client or compatible command installed. This is useful for existing mariadb server + elif [ -x "$(command -v mysql)" ]; then + MYSQL="" else MYSQL="default-mysql-client" fi