|
From: | Danilo Malcangio |
Subject: | Re: [Linphone-developers] Problem using linphonecsh in a bash script |
Date: | Fri, 26 Oct 2012 11:20:56 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
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, |
[Prev in Thread] | Current Thread | [Next in Thread] |