added file dependency check, switched back to english, smaller fix and improvements

This commit is contained in:
fatalerrors
2021-11-18 14:53:11 +01:00
parent 9fc9b96165
commit b71a0c2ee8
21 changed files with 360 additions and 173 deletions

View File

@@ -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