I have an upstart configuration that worked before and now it shows the error:
Could not open input file: /var/local/test/run.php
but the file is there and I can normally run it with php /var/local/test/run.php
command.
# Events
start on local-filesystems and net-device-up IFACE=eth0
stop on shutdown
# Automatically respawn
respawn
respawn limit 20 5
script
exec php -f /var/local/test/run.php
end script
I tried chmod 777, but not helping.
What are my options? Please help. Thank you!
UPDATE:
adding an instance variable:
instance $ID
made it work, The thing is that before it used the instance, but now I decided to change the script a bit, and removed it. So I was thinking, is there some cache or similar that I can delete (that does not get deleted with rebooting)?
UPDATE 2
I figured out that the script adds an end-line char at the end of command, so that is the reason it cannot find the path. I tried surrounding it with quotes:
exec php -f "/var/local/test/run.php"
but it still starts the script with end-line char at the end of php script file path.
What can I do?