From 64686921ddc3239acb4eb992fb3c22dd03ee1fc0 Mon Sep 17 00:00:00 2001 From: lrob Date: Thu, 18 Feb 2016 13:43:52 +0100 Subject: [PATCH 1/4] Support for exim and sendmail mail servers Fixes #695, displayed error if another mail client was installed. Should fix it for any mail server that makes a /usr/bin/mailx file, displaying a nice package check if exim or sendmail (very popular) are installed :) --- functions/check_deps.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/functions/check_deps.sh b/functions/check_deps.sh index 3f9312024..7c16f7192 100644 --- a/functions/check_deps.sh +++ b/functions/check_deps.sh @@ -40,10 +40,16 @@ fi fn_deps_email(){ # Adds postfix to required dependencies if email notification is enabled if [ "${emailnotification}" == "on" ]; then - if [ -n "$(command -v dpkg-query)" ]; then - array_deps_required+=( mailutils postfix ) - elif [ -n "$(command -v yum)" ]; then - array_deps_required+=( mailx postfix ) + if [ -d /etc/exim4 ]; then + array_deps_required+=( exim4 ) + elif [ -d /etc/sendmail ]; then + array_deps_required+=( sendmail ) + elif [ ! -f /usr/bin/mailx ]; then + if [ -n "$(command -v dpkg-query)" ]; then + array_deps_required+=( mailutils postfix ) + elif [ -n "$(command -v yum)" ]; then + array_deps_required+=( mailx postfix ) + fi fi fi } @@ -201,4 +207,4 @@ elif [ -n "$(command -v yum)" ]; then fi fn_deps_email fn_check_loop -fi \ No newline at end of file +fi From 1b294aad6947b255775b534d8dfa49100b8c91e5 Mon Sep 17 00:00:00 2001 From: lrob Date: Fri, 19 Feb 2016 00:40:37 +0100 Subject: [PATCH 2/4] Removing mailx detection so it can add required packages check anyways --- functions/check_deps.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/functions/check_deps.sh b/functions/check_deps.sh index 7c16f7192..37236aad0 100644 --- a/functions/check_deps.sh +++ b/functions/check_deps.sh @@ -44,12 +44,10 @@ if [ "${emailnotification}" == "on" ]; then array_deps_required+=( exim4 ) elif [ -d /etc/sendmail ]; then array_deps_required+=( sendmail ) - elif [ ! -f /usr/bin/mailx ]; then - if [ -n "$(command -v dpkg-query)" ]; then - array_deps_required+=( mailutils postfix ) - elif [ -n "$(command -v yum)" ]; then - array_deps_required+=( mailx postfix ) - fi + elif [ -n "$(command -v dpkg-query)" ]; then + array_deps_required+=( mailutils postfix ) + elif [ -n "$(command -v yum)" ]; then + array_deps_required+=( mailx postfix ) fi fi } From a7c5886cec730814013e1fe0ab3cac027916804b Mon Sep 17 00:00:00 2001 From: lrob Date: Fri, 19 Feb 2016 01:01:20 +0100 Subject: [PATCH 3/4] Version number --- functions/check_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/check_deps.sh b/functions/check_deps.sh index 37236aad0..f6538bd63 100644 --- a/functions/check_deps.sh +++ b/functions/check_deps.sh @@ -2,7 +2,7 @@ # LGSM check_deps.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="060216" +lgsm_version="190216" # Description: Checks that the requires dependencies are installed for LGSM. From 7a58d80d9ec276002ed97ccd49ef05aa9b83cf3e Mon Sep 17 00:00:00 2001 From: lrob Date: Sat, 20 Feb 2016 12:41:55 +0100 Subject: [PATCH 4/4] check using mailx Keeping displaying the presence of exim4, sendmail, postfix, mailutils, and mailx in the right case. --- functions/check_deps.sh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/functions/check_deps.sh b/functions/check_deps.sh index f6538bd63..88f8fb773 100644 --- a/functions/check_deps.sh +++ b/functions/check_deps.sh @@ -40,15 +40,23 @@ fi fn_deps_email(){ # Adds postfix to required dependencies if email notification is enabled if [ "${emailnotification}" == "on" ]; then - if [ -d /etc/exim4 ]; then - array_deps_required+=( exim4 ) - elif [ -d /etc/sendmail ]; then - array_deps_required+=( sendmail ) - elif [ -n "$(command -v dpkg-query)" ]; then - array_deps_required+=( mailutils postfix ) - elif [ -n "$(command -v yum)" ]; then - array_deps_required+=( mailx postfix ) - fi + if [ -f /usr/bin/mailx ]; then + if [ -d /etc/exim4 ]; then + array_deps_required+=( exim4 ) + elif [ -d /etc/sendmail ]; then + array_deps_required+=( sendmail ) + elif [ -n "$(command -v dpkg-query)" ]; then + array_deps_required+=( mailutils postfix ) + elif [ -n "$(command -v yum)" ]; then + array_deps_required+=( mailx postfix ) + fi + else + if [ -n "$(command -v dpkg-query)" ]; then + array_deps_required+=( mailutils postfix ) + elif [ -n "$(command -v yum)" ]; then + array_deps_required+=( mailx postfix ) + fi + fi fi }