From 9f9feb4f011e4dab29e6f1282b64bc9fd509a21f Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 8 Aug 2020 20:43:21 +0200 Subject: [PATCH] install_amavis.sh: recreate 'razor-agent.conf' if first creation failed. --- install_amavis.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/install_amavis.sh b/install_amavis.sh index 8cc85f2..4c540ca 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -1190,6 +1190,27 @@ if [[ $? -eq 0 ]] ; then else echo_failed error "$(cat $tmp_err_msg)" + + echononl " Try to create \"razor-agent.conf\" in (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.