upstart service giving 'chdir: command not found' error
6,810
chdir
is its own stanza. Move it from inside the script block to outside. Here's how it should probably look:
description "watch folder service"
author "Jonathan Topf"
start on startup
stop on shutdown
respawn
respawn limit 99 5
chdir /home/jon/Dropbox/Render\ Farm\ 1/appleseed/bin
script
exec /usr/bin/python ./watchfolder.py ../../data/
echo "watch_folder started"
end script
Related videos on Youtube
Author by
jonathan topf
Updated on September 18, 2022Comments
-
jonathan topf over 1 year
I've created an upstart conf script called watch_folder.conf that i have used successfully on a few ubuntu installs already but for some reason I'm getting an error from the following code:
#/etc/init/watch_folder.conf description "watch folder service" author "Jonathan Topf" start on startup stop on shutdown respawn respawn limit 99 5 script chdir /home/jon/Dropbox/Render\ Farm\ 1/appleseed/bin exec /usr/bin/python ./watchfolder.py ../../data/ echo "watch_folder started" end script
if I look inside /var/log/upstart/watch_folder.log i see the following
/proc/self/fd/9: line 2: chdir: command not found /proc/self/fd/9: line 2: chdir: command not found /proc/self/fd/9: line 2: chdir: command not found /proc/self/fd/9: line 2: chdir: command not found /proc/self/fd/9: line 2: chdir: command not found /proc/self/fd/9: line 2: chdir: command not found ...
Does anybody know what may cause this error, its perplexing me!