diff --git a/install_postfix_base.sh b/install_postfix_base.sh index d9988bc..c6ecefb 100755 --- a/install_postfix_base.sh +++ b/install_postfix_base.sh @@ -12,9 +12,19 @@ _TLS_KEY_FILE="${_TLS_CERT_DIR}/mailserver.key" _TLS_CA_FILE=/etc/ssl/certs/ca-certificates.crt +log_file=$(mktemp) + + # ------------- # --- Some functions # ------------- +clean_up() { + + # Perform program exit housekeeping + rm -f $log_file + exit $1 +} + echononl(){ echo X\\c > /tmp/shprompt$$ if [ `wc -c /tmp/shprompt$$ | awk '{print $1}'` -eq 1 ]; then @@ -31,7 +41,7 @@ fatal(){ echo "" echo -e "\t\033[31m\033[1mInstalllation will be interrupted\033[m\033[m" echo "" - exit 1 + clean_up 1 } error(){ @@ -1173,4 +1183,4 @@ fi echo "" -exit +clean_up 0