From 14f7ea255ebf0fdb7b9683fb1f7209571656d091 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 25 Jul 2014 17:08:40 +0530 Subject: [PATCH] Added error handling --- .../stack/install/mail/ee_mod_setup_postfix.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modules/stack/install/mail/ee_mod_setup_postfix.sh b/src/modules/stack/install/mail/ee_mod_setup_postfix.sh index ef0e5091..4ddc5f35 100644 --- a/src/modules/stack/install/mail/ee_mod_setup_postfix.sh +++ b/src/modules/stack/install/mail/ee_mod_setup_postfix.sh @@ -4,8 +4,9 @@ function ee_mod_setup_postfix() { ee_lib_echo "Configuring Postfix, please wait..." #Configure Master.cf - sed -i 's/#submission/submission/' /etc/postfix/master.cf - sed -i 's/#smtps/smtps/' /etc/postfix/master.cf + sed -i 's/#submission/submission/' /etc/postfix/master.cf && + sed -i 's/#smtps/smtps/' /etc/postfix/master.cf \ + || ee_lib_error "Unable to setup details in master.cf file, exit status = " $? #Configure main.cf #postconf "#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache" @@ -37,7 +38,9 @@ function ee_mod_setup_postfix() # Setting up Postfix MySQL configuration mkdir -p /etc/postfix/mysql - cp -av /usr/share/easyengine/mail/virtual_alias_maps.cf /etc/postfix/mysql/virtual_alias_maps.cf - cp -av /usr/share/easyengine/mail/virtual_domains_maps.cf /etc/postfix/mysql/virtual_domains_maps.cf - cp -av /usr/share/easyengine/mail/virtual_mailbox_maps.cf /etc/postfix/mysql/virtual_mailbox_maps.cf + cp -av /usr/share/easyengine/mail/virtual_alias_maps.cf /etc/postfix/mysql/virtual_alias_maps.cf && + cp -av /usr/share/easyengine/mail/virtual_domains_maps.cf /etc/postfix/mysql/virtual_domains_maps.cf && + cp -av /usr/share/easyengine/mail/virtual_mailbox_maps.cf /etc/postfix/mysql/virtual_mailbox_maps.cf \ + ee_lib_error "Unable to copy Postfix MySQL configuration files, exit status = " $? + }