Browse Source

notify-script.example: Run EMAIL_PROGRAM only if exists and it is executable

Georgi Chorbadzhiyski 7 years ago
parent
commit
0d22eb0f89
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      notify-script.example

+ 2
- 0
notify-script.example View File

@@ -55,6 +55,7 @@ fi
55 55
 
56 56
 if [ "$EMAIL_ENABLED" = "yes" ]
57 57
 then
58
+	if [ -x $EMAIL_PROGRAM ]; then
58 59
 	(
59 60
 		echo "To: <$EMAIL_TO>"
60 61
 		echo "From: <$EMAIL_FROM>"
@@ -68,4 +69,5 @@ then
68 69
 		echo
69 70
 		echo "${_IDENT} ${_MESSAGE_TEXT}"
70 71
 	) | $EMAIL_PROGRAM
72
+	fi
71 73
 fi

Loading…
Cancel
Save