From 85ca349abc5d04a92eae450ecfddeaa753b40c8b Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Thu, 21 Sep 2023 19:47:36 +0100 Subject: [PATCH] Correct wrapping and make dh2048 file optional if exists --- xmpp-wizard.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xmpp-wizard.sh b/xmpp-wizard.sh index 0473d21..d78c02c 100644 --- a/xmpp-wizard.sh +++ b/xmpp-wizard.sh @@ -54,7 +54,7 @@ done mariadb -e "CREATE DATABASE $sqldb; CREATE USER $sqlusername@localhost IDENTIFIED BY '$sqlpassword'; GRANT ALL ON ejabberd.* TO $sqlusername@localhost" -echo " +echo """ -- -- ejabberd, Copyright (C) 2002-2023 ProcessOne -- @@ -520,10 +520,12 @@ CREATE TABLE mqtt_pub ( user_properties blob NOT NULL, expiry int unsigned NOT NULL, UNIQUE KEY i_mqtt_topic (topic(191)) -) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" | mariadb -D $sqldb +) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;""" | mariadb -D $sqldb -echo "Generating dhfile..." -openssl dhparam -out /etc/ssl/dh2048.pem 2048 +if [ ! -f /etc/ssl/dh2048.pem ] + echo "Generating dhfile..." + openssl dhparam -out /etc/ssl/dh2048.pem 2048 +fi echo "HTTP uploads in XMPP are stored on the server itself. There are many different parameters you can configure with respect to HTTP uploads. A soft