Browse Source

Support for alpine linux

detects if cp and grep are the non BusyBox versions
eXtremeSHOK 7 years ago
parent
commit
51b57320c2
1 changed files with 9 additions and 0 deletions
  1. 9 0
      generate_config.sh

+ 9 - 0
generate_config.sh

@@ -1,5 +1,14 @@
 #!/bin/bash
 #!/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
 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
   read -r -p "A config file exists and will be overwritten, are you sure you want to contine? [y/N] " response
   case $response in
   case $response in