i have a command that run normally in terminal :
php -f /home/roshd-user/Symfony/app/console video:convert
i want run this command as service in my server. create a vconvertor.conf in /etc/init/ .
this service run(start and stop) normally but not execute my command ?!
my command without service is run well and return my result but when use it into a service not execute ?!
vconvertor.conf contain this codes :
#info
description "Video Convertor PHP Worker"
author "Netroshd"
# Events
start on startup
stop on shutdown
# Automatically respawn
respawn
respawn limit 20 5
# Run the script!
# Note, in this example, if your PHP script returns
# the string "ERROR", the daemon will stop itself.
script
[ $( exec php -f /home/roshd-user/Symfony/app/console video:convert
) = 'ERROR' ] && ( stop; exit 1; )
end script