X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mail-setup;h=93d09c739402f2c4b8c78c7b79aa22641b228f5b;hb=343a048be4b32d18540c6531048d2b9a006774ae;hp=c313c46da685e41f4381bcadbb9cee071df3be50;hpb=c926b55471a48cbcd99607ce1e003da55211d166;p=distro-setup diff --git a/mail-setup b/mail-setup index c313c46..93d09c7 100755 --- a/mail-setup +++ b/mail-setup @@ -15,12 +15,13 @@ set -x # See the License for the specific language governing permissions and # limitations under the License. -# todo: make quick backups of maildir, or deliver to multiple hosts. +# TODO: copy dkim keys from within this file. its now done in conflink. +# TODO: fix dkim key to b chmod 640, group Debian-exim set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" if [[ ! $SUDO_USER ]]; then echo "$0: error: requires running as nonroot or sudo" exit 1 @@ -340,10 +341,11 @@ EOF #### begin mail cert setup ### f=/usr/local/bin/mail-cert-cron cat >$f <<'EOF' +#!/bin/bash set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -[[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" f=/a/bin/bash_unpublished/source-state if [[ -e $f ]]; then