diff --git a/generic-hc/0.1 b/generic-hc/0.1 index 627b815..53a88f3 100644 --- a/generic-hc/0.1 +++ b/generic-hc/0.1 @@ -6,7 +6,7 @@ URL_VERSION="https://raw.githubusercontent.com/pvizeli/hassio/master/version.jso URL_GENERIC_HC="https://raw.githubusercontent.com/pvizeli/hassio-build/master/generic-hc" # Check system options -if [ command -v systemctl > /dev/null 2>&1 ]; then +if [ -x $(command -v systemctl) ]; then INIT_SYSTEM=systemd else INIT_SYSTEM=sysvinit diff --git a/install/hassio_install b/install/hassio_install index badbe8a..e43359d 100644 --- a/install/hassio_install +++ b/install/hassio_install @@ -19,11 +19,12 @@ command -v socat > /dev/null 2>&1 || { echo "[ERROR] Please install socat first" command -v curl > /dev/null 2>&1 || { echo "[ERROR] Please install curl first"; exit 1; } # Check system options -if [ command -v systemctl > /dev/null 2>&1 ]; then +if [ -x $(command -v systemctl) ]; then INIT_SYSTEM=systemd else INIT_SYSTEM=sysvinit echo "[ERROR] Only systemd is supprted at the moment" + exit 1 fi # Parse command line parameters