Re: observation on "run on receive" process failed with exit status 1
gilberto dos santos alves <[email protected]>
| Newsgroups | gmane.linux.drivers.gammu |
|---|---|
| Message-ID | <CAP9G-NKywP1tE0Rvb0q9U4UYbiZodfZAJ2zLD9EiJOYEqzF4Lg@mail.gmail.com> |
hi. IMO change #!/bin/sh by !#/bin/bash or !#/bin/python and make one very very simple teste for undersdand what is going on. remember check owner and grupo of running command (chown) and (chmod) for user/group. please post what is your operation system, kernel etc. put loglevel for gammu-smsd for 255 to see everything. i used with sucess gammu-smsd using bash, python, php and on windows .bat commands. hope this help. 2015-01-24 11:17 GMT-02:00 <[email protected]>: > After I have sucessfully configured SMS receiving I discovered the > following entries in my log file whenever an sms is received: > > > > Sat 2015/01/24 13:50:46 gammu-smsd[2857]: Number xxxx matched > IncludeNumbers > Sat 2015/01/24 13:50:46 gammu-smsd[2857]: Received message from: xxxx > Sat 2015/01/24 13:50:46 gammu-smsd[2857]: Read 1 messages > Sat 2015/01/24 13:50:46 gammu-smsd[2857]: Received > IN20150124_135041_00_xxxx_00.txt > Sat 2015/01/24 13:50:46 gammu-smsd[2876]: Starting run on receive: > /usr/local/bin/smsReceiver.sh IN20150124_135041_00_xxxx_00.txt > Sat 2015/01/24 13:50:46 gammu-smsd[2857]: Process failed with exit status 1 > > > > The "run on receive" was nevertheless executed successfully. > > If I execute the script /usr/local/bin/smsReceiver.sh it returns with exit > status 0 which means successful. > > > > Somehow gammu does not receive the return status correctly and reports an > exit status of 1 though. > > > > If I explicitly set the exit status within my script I can control the > error message. > > > > ___ Here are the results of my tests ___ > > > > 1. this is my test script /usr/local/bin/smsReceiver.sh > > #!/bin/sh > > PROGRAM=/bin/echo > LOGfile=/tmp/smsIN.txt > > { $PROGRAM env _______ > env 2>&1 > $PROGRAM set _______ > set 2>&1 > } >> $LOGfile > echo > > #exit 0 > > > > 2. if I run the script on the shell the return status is 0 due to the last > echo but "run on receive" always reports "exit status 1" > > 3. if I uncomment the "exit 0" in the last line and set the exit status > explicitly, > > I can control the error message in the gammu-smsd log, > > i.e. if I do "exit 0" there is no "Process failed" message > > If I do "exit 2" the log entry says "Process failed with exit status > 2" > > and if I do "exit 1" the log entry says "Process failed with exit > status 1" > > > > > --- > Alle Postfächer an einem Ort Jetzt wechseln und E-Mail-Adresse mitnehmen! Rundum > glücklich mit freenetMail <http://email.freenet.de/basic/Informationen> > > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > Gammu-users mailing list - > https://lists.sourceforge.net/lists/listinfo/gammu-users > > -- gilberto dos santos alves +55(11)9-8646-5049 sao paulo - sp - brasil ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Gammu-users mailing list - https://lists.sourceforge.net/lists/listinfo/gammu-users