added file dependency check, switched back to english, smaller fix and improvements
This commit is contained in:
@@ -10,9 +10,10 @@
|
||||
# Variable:
|
||||
# * HOSTNAME: Name of the host
|
||||
# * MAINDOM: Default main domain name
|
||||
# * MAIL_RELAY: Name of the mail relay server
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
export VER_conf_mail="0.0.3"
|
||||
export VER_conf_mail="0.0.4"
|
||||
export DEP_conf_mail="upgrade_dist"
|
||||
|
||||
conf_mail()
|
||||
@@ -21,9 +22,9 @@ conf_mail()
|
||||
pkginst postfix
|
||||
|
||||
prnt I "Configuration de postfix..."
|
||||
installfile postfix_main.cf /etc/postfix/main.cf
|
||||
installfile postfix/main.cf /etc/postfix/main.cf
|
||||
sed -i -e "s/@HOSTNAME@/$HOSTNAME/" -e "s/@MAINDOM@/$MAINDOM/" \
|
||||
/etc/postfix/main.cf
|
||||
-e "s/@MAIL_RELAY@/$MAIL_RELAY/" /etc/postfix/main.cf
|
||||
echo $HOSTNAME.$MAINDOM > /etc/mailname
|
||||
svc_restart postfix
|
||||
}
|
||||
@@ -34,6 +35,7 @@ precheck_conf_mail()
|
||||
prnt E "Aucun domaine principal renseigné."
|
||||
die 158
|
||||
fi
|
||||
file_exists postfix/main.cf
|
||||
}
|
||||
|
||||
export -f conf_mail
|
||||
|
||||
Reference in New Issue
Block a user