From 51b57320c266c51815a0f8ec9fc3b35fb6dcf72b Mon Sep 17 00:00:00 2001 From: eXtremeSHOK Date: Wed, 14 Feb 2018 17:08:03 +0200 Subject: [PATCH] Support for alpine linux detects if cp and grep are the non BusyBox versions --- generate_config.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/generate_config.sh b/generate_config.sh index 5b2d23f4..b49a6a21 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -1,5 +1,14 @@ #!/bin/bash +if grep --help 2>&1 | head -n 1 | grep -q -i "busybox" ; then + echo "BusybBox grep detected, please install gnu grep, \"apk add --upgrade grep\"" + exit 1 +fi +if cp --help 2>&1 | head -n 1 | grep -q -i "busybox" ; then + echo "BusybBox cp detected, please install coreutils, \"apk add --upgrade coreutils\"" + exit 1 +fi + if [[ -f mailcow.conf ]]; then read -r -p "A config file exists and will be overwritten, are you sure you want to contine? [y/N] " response case $response in