mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-04-01 21:27:22 +02:00
moved trap and changed to EXIT, that way we get correct named scripts exits on sourced scripts
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# -u: exit if we have a variable typo.
|
||||
# -o pipefail: don't ignore errors in the non-last command in a pipeline
|
||||
set -euo pipefail
|
||||
|
||||
trap 'rc=$?; echo "$0: Error on line $LINENO running $BASH_COMMAND which had the following exit code $rc" 1>&2' EXIT
|
||||
function hide_output {
|
||||
# This function hides the output of a command unless the command fails
|
||||
# and returns a non-zero exit code.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This is the entry point for configuring the system.
|
||||
#####################################################
|
||||
trap 'rc=$?; echo "$0: Error on line $LINENO running $BASH_COMMAND which had the following exit code $rc" 1>&2' ERR
|
||||
|
||||
source setup/functions.sh # load our functions
|
||||
|
||||
# Check system setup: Are we running as root on Ubuntu 18.04 on a
|
||||
|
||||
Reference in New Issue
Block a user