From 1b59cede55a2cb19f38c5abe937728df929ac23e Mon Sep 17 00:00:00 2001 From: Christoph Kuchenbuch Date: Thu, 2 Jul 2026 17:36:42 +0200 Subject: [PATCH] =?UTF-8?q?install=5Fsympa.sh:=20take=20care=20sympa.servi?= =?UTF-8?q?ce=20is=20=C3=B6oaded=20after=20database=20service.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install_sympa.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/install_sympa.sh b/install_sympa.sh index 389d939..f94b8f6 100755 --- a/install_sympa.sh +++ b/install_sympa.sh @@ -3887,6 +3887,62 @@ if $START_AT_BOOTTIME ; then ## - if $SYSTEMD_SUPPORTED ; then + _failed=false + if [[ ! -f /etc/systemd/system/sympa.service.d/override.conf ]]; then + + echo "mkdir \"/etc/systemd/system/sympa.service.d\"" >> $_log_file 2>&1 + mkdir "/etc/systemd/system/sympa.service.d" >> $_log_file 2>&1 + if [[ $? -gt 0 ]] ; then + _failed=true + fi + fi + + echo "cat <<'EOF' /etc/systemd/system/sympa.service.d/override.conf +[Unit] +After=mysql.service mariadb.service +Requires=mysql.service +EOF" >> $_log_file + cat <<'EOF' > /etc/systemd/system/sympa.service.d/override.conf 2>> $_log_file +[Unit] +After=mysql.service mariadb.service +Requires=mysql.service +EOF + if [[ $? -gt 0 ]] ; then + _failed=true + fi + + if ${_failed}; then + echo_failed + error "Adjusting '/etc/systemd/system/sympa.service.d/override.conf' failed!\n + See '${_log_file}' for further informations." + + echononl " continue anyway [yes/no]: " + read OK + OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')" + while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do + echononl "Wrong entry! - repeat [yes/no]: " + read OK + done + [[ $OK = "yes" ]] || fatal "Abbruch durch User" + fi + + # - Reload systemd daemon + # - + echo "" >> $_log_file + echo "## - Reload systemd daemon" >> $_log_file + echo "## -" >> $_log_file + echononl "\tReload systemd daemon" + echo "systemctl daemon-reload" >> $_log_file + systemctl daemon-reload >> $_log_file 2>&1 + if [ "$?" = "0" ]; then + echo_ok + else + echo_failed + error "Reloading systemd daemon failed! \n + See '${_log_file}' for further informations." + fi + + # - Sympa service # - echo "" >> $_log_file