]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Ask if self-signed certs should be deleted when running configure.
authorSadie Powell <sadie@witchery.services>
Mon, 3 Aug 2020 11:15:04 +0000 (12:15 +0100)
committerSadie Powell <sadie@witchery.services>
Mon, 3 Aug 2020 11:15:04 +0000 (12:15 +0100)
Closes #1793.

configure

index 5de4c79036153c9f019eeafe25c7f21d3e986914..3ea4d7287e6190aead8ab0bbf54fa911838e22bf 100755 (executable)
--- a/configure
+++ b/configure
@@ -394,6 +394,17 @@ EOQ
 if (<$RealDir/src/modules/m_ssl_*.cpp>) {
        if (prompt_bool $interactive, $question, $interactive) {
                system './tools/genssl', 'auto';
+       } else {
+               my @pems = <$RealDir/{cert,csr,dhparams,key}.pem>;
+               $question = <<EOQ;
+The following self-signed files were previously generated and will be installed
+when you run Make. Do you want to delete them?
+
+  * ${\join "\n  * ", @pems}
+EOQ
+               if (@pems && prompt_bool $interactive, $question, 0) {
+                       unlink @pems;
+               }
        }
 } else {
        print_warning <<"EOM";