Running Ruby XML Parse fired from incrontab

rediam

New Member
I have an entry in incrontab that looks like this:\[code\]/var/www/html/tmp_files/xml IN_CLOSE_WRITE sh /var/www/html/tmp_files/notify.sh $# $@\[/code\]In notify.sh we have:\[code\]#!/bin/shfilename="$1" csvname="fightcard.cmd.csv" if [ "${filename:0:1}" == "$action" ]; then csvname="action.cmd.csv"elif [ "${filename:0:1}" == "$stats" ]; then csvname="stats.cmd.csv"else sleep 0.1fi#execute the ruby statement............ruby /var/www/html/processXML.rb -f /var/www/html/tmp_files/xml/${filename} -c /var/www/html/${csvname} -l /var/www/html/tmp_files/logs/${filename}.log > /var/www/html/tmp_files/json/${filename%.xml}.json\[/code\]I have chmodded notify.sh to executable.So we ftp a file into \[code\]/var/www/html/tmp_files/xml/\[/code\]When I run the script from command everything works correctly like so:\[code\]sh /var/www/html/tmp_files/notify2.sh Stats.xml\[/code\]but whenever it fires from the incrontab event, I end up with a blank json file.anybody know what gives?
 
Back
Top