Found the solution...it was a problem
with cron, nothing related to linphone
All i needed was to add the PATH variable in the script and
everything worked
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Il 26/10/2012 11.20, Danilo Malcangio ha scritto:
Problem using linphonechs in a
bash script in cron
Error in my previous message: I can't init linphonecsh if I put
the bash script in cron (trhought crontab), if i execute the
script it does work
I will post the script, the crontab entry and the output log i
get
SCRIPT
!/bin/bash
{
checkproc=(`ps -A |grep linphone`)
if [ -z $checkproc ]; then
eval "/usr/local/bin/linphonecsh init -a -c
/usr/local/StartPhone/linphone.conf"
fi
outReg=(`eval "/usr/local/bin/linphonecsh status register"`)
echo "Status Register: $outReg"
} | sed "s/^/[$(date +"%Y.%m.%d-%T")]\ "/ | tee -a logging.log
CRONTAB ENTRY (executed every minute)
*/1 * * * * /usr/local/StartPhone/test.sh
OUTPUT (proof that the init didn't work)
[2012.10.26-10:28:01] Status Register:
At the beginning my idea was that it was a permissions or path
issue, but I've used absolute paths and given the file a chmod
755
Hope someone else has had the same problem and solved it
Thanks again
Il 25/10/2012 18.54, Danilo Malcangio ha scritto:
Hello everyone,
I am trying to use linphonecsh in a bash script.
If I try to execute the init in a script it doesn't work (eval
"/usr/local/bin/linphonecsh init -a -c
'/usr/local/StartPhone/linphone.conf'").
If I use linphonecsh init -a -c
'/usr/local/StartPhone/linphone.conf' in the shell it
works properly.
I've also tried, in the bash script, eval
"/usr/local/bin/linphonecsh init -a" (without the config file),
but still got no result.
What am i doing wrong?
Thanks for the support
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers