Im trying to run script inside rc.d but its not working but if i give path of the script inside rc.d/myscript file its working fine. below script is working fine