0

我已经创建了一个名为 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
...

有谁知道可能导致此错误的原因,这让我感到困惑!

4

1 回答 1

0

我似乎没有误解 upstart conf 文件的结构,例如scriptchdir是一个节,所以不应该出现在一个节中。

更多信息在这里

https://askubuntu.com/questions/321867/upstart-service-giving-chdir-command-not-found-error#321871

于 2013-07-19T12:50:17.690 回答