Doorpi does not execute shell commands in a bash file

  • Hello Thomas,


    There is a bug: Doorpi does not execute the last 2 commands of the following .sh file:


    Bash
    #!/bin/bash
    echo  "Date: " `date`  >> /home/pi/Doorpi/mail.txt
    echo "objet" | mutt -s "texte" xxxxxx@orange.fr
    cat /home/pi/Doorpi/mail.txt | mutt -s "texte" xxxxxx@orange.fr

    The mail.txt file is updated with the first echo statement but the last 2 statements are not executed.


    The proof also is that the last 2 instructions seize separately in a console, work properly.


    See the following message: https://www.doorpi.org/forum/t…ile/?postID=6217#post6217


    Waiting, cordially.


    Pat

  • I inform you that I finally managed with DOORPI to send me a message with an attachment with the command "... cat ... mutt ..."


    In fact, you must force mutt to use the .muttr file


    Here is the command to integrate in the file send_mail.sh:


    / Bin / cat /home/pi/Doorpi/mail.txt | / Usr / bin / mutt -F /home/pi/.muttrc -s "There's someone!" -a /home/pi/Doorpi/message_absence.wav - xxxxxxx@orange.fr



    PatI


    PS : nteresting link is on MUTT : cedricduval.free.fr/mutt/en/sitehtml/manual-6.html