1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-25 02:29:32 +02:00

Update generate_config.sh

exit on error and pipefail
minor fix " ; then" to ";then"
This commit is contained in:
eXtremeSHOK 2018-02-20 00:39:53 +02:00 committed by GitHub
parent 6e91504f6f
commit 40885b7fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,14 @@
#!/bin/bash
if grep --help 2>&1 | head -n 1 | grep -q -i "busybox" ; then
+#exit on error and pipefail
+set -o errexit
+set -o pipefail
if grep --help 2>&1 | head -n 1 | grep -q -i "busybox"; then
echo "BusybBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\""
exit 1
fi
if cp --help 2>&1 | head -n 1 | grep -q -i "busybox" ; then
if cp --help 2>&1 | head -n 1 | grep -q -i "busybox"; then
echo "BusybBox cp detected, please install coreutils, \"apk add --no-cache --upgrade coreutils\""
exit 1
fi