我已经创建了一个名为 watch_folder.conf 的新贵 conf 脚本,我已经在一些 ubuntu 安装中成功使用了该脚本,但由于某种原因,我从以下代码中收到错误消息:
#/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
如果我查看 /var/log/upstart/watch_folder.log 我会看到以下内容
/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
...
有谁知道可能导致此错误的原因,这让我感到困惑!