Running Ruby XML Parse fired from incrontab -


i have entry in incrontab looks this:

/var/www/html/tmp_files/xml in_close_write sh /var/www/html/tmp_files/notify.sh $# $@ 

in notify.sh have:

#!/bin/sh filename="$1"  csvname="fightcard.cmd.csv"   if   [ "${filename:0:1}" == "$action" ];                 csvname="action.cmd.csv" elif [ "${filename:0:1}" == "$stats" ];                 csvname="stats.cmd.csv" else         sleep 0.1 fi  #execute 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 

i have chmodded notify.sh executable.

so ftp file /var/www/html/tmp_files/xml/

when run script command works correctly so:

sh /var/www/html/tmp_files/notify2.sh stats.xml 

but whenever fires incrontab event, end blank json file.

anybody know gives?


Comments

Post a Comment

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -

android - send complex objects as post php java -