]> gitweb.fluxo.info Git - firma.git/commitdiff
EmailListAdministration change in MESSAGE_BODY handling
authorrhatto <rhatto>
Thu, 12 Oct 2006 00:12:52 +0000 (00:12 +0000)
committerrhatto <rhatto>
Thu, 12 Oct 2006 00:12:52 +0000 (00:12 +0000)
firma

diff --git a/firma b/firma
index de6f3e0cfb7fc6cbb62fb1e96b894e2026ad53d1..749c270c780bccab812c215b43c210e115734489 100755 (executable)
--- a/firma
+++ b/firma
@@ -1790,7 +1790,7 @@ function AdminLog {
 
   if [ "$MODE" == "admin-interactive" ]; then
     echo >&2 "$*"
-  elif [ "$MODE" == "admin-non-interactive" ]; then
+  elif [ "$MODE" == "admin-non-interactive" ]; then
     ADMIN_MESSAGE="$ADMIN_MESSAGE\n$*"
   else
     echo $*
@@ -1808,7 +1808,6 @@ function EmailListAdministration {
   #          1 on failure  :/
   #-------------------------------------------------------------
 
-  local -i return_code=0
   local sender found
   local command
 
@@ -1822,14 +1821,15 @@ function EmailListAdministration {
   if [ "$found" == "1" ]; then
     # message was sent by an admin
     #+then, parse and process admin tasks
-    echo -e "$DECRYPTED_MESSAGE" | while read command; do
+    MESSAGE_BODY="\
+    `echo -e "$DECRYPTED_MESSAGE" | while read command; do
       if [ ! -z "$command" ]; then
         AdminLog "Command> $command"
         ListAdministration $command
       fi
-    done
+    done`"
     # TODO: send encrypted
-    MESSAGE_BODY="`echo -e "$ADMIN_MESSAGE"`"
+    MESSAGE_BODY="`echo -e "$ADMIN_MESSAGE"`"
     ComposeAndSendBounceMessage
   else
     # message was sent by a normal subscriber
@@ -1840,7 +1840,7 @@ function EmailListAdministration {
     ComposeAndSendBounceMessage
   fi
 
-  return $return_code
+  return $?
 }