install_amavis.sh: recreate 'razor-agent.conf' if first creation failed.

This commit is contained in:
Christoph 2020-08-08 20:43:21 +02:00
parent e38f1a704d
commit 9f9feb4f01

View File

@ -1190,6 +1190,27 @@ if [[ $? -eq 0 ]] ; then
else
echo_failed
error "$(cat $tmp_err_msg)"
echononl " Try to create \"razor-agent.conf\" in <razorhome> (user root) once again.."
razor-admin -create > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]] ; then
echo_ok
else
echo_failed
error "$(cat $tmp_err_msg)"
echononl "\tcontinue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
fi
fi
## - Registers a new identity, used for authenticating with Razor Nomination Servers.