Преглед изворни кода

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 :)
lrob пре 10 година
родитељ
комит
64686921dd
1 измењених фајлова са 11 додато и 5 уклоњено
  1. 11 5
      functions/check_deps.sh

+ 11 - 5
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
+fi