我试图启动incron守护进程“ incrond ”在启动,但不起作用。
我已经做好了 :
ln -s /usr/sbin/incrond /etc/init.d/incrond chmod 755 /etc/init.d/incrond update-rc.d incrond enable
但没有“ incrond ”pid在那里运行。
题
我应该绝对使用/etc/init.d/skeleton作为一个起点,还是可以将符号链接到现有的“ incrond ”守护进程,然后如何呢?
注意:
这个Lenny发行版没有“ 服务名称开始 ”。
编辑 :作为一个厨师的书,这里是我解决这个问题的答案的提示
# Update the discontinued Lenny sources list ("vim /etc/apt/sources.list") # Reinstall incron ("aptitude reinstall incron"), maybe should also reinstall inotify-tools # Create manually the famous missing start script ("vim /etc/init.d/incron" and, chmod 755 this file) # Run the daemon at boot ("update-rc.d incron enable") # Check start/stop args passed to the daemon ("/etc/init.d/incron restart" and then, "pidof incrond") # Reboot and control again that the daemon incrond is running (use "pidof" or "ps -ef | grep incron" or "cat /var/run/incron.pid")
注意:我在这里find了启动脚本的一个很好的基础,但是没有面对这个incrond超时问题 。
ln -s /usr/sbin/incrond /etc/init.d/incrond
它不这样工作。 当系统为运行级别运行各种启动脚本时,它会传递一个参数,如启动,停止,重新启动等等。 你不能只符合链接守护进程的二进制文件,因为该二进制文件将失败,或者传递这些参数时不正确的响应。
几乎可以肯定需要创build一个启动脚本。 它不一定是骨架的副本,但它必须至less接受启动,停止和重新启动参数。
不,不应该做你正在做的事情。 /etc/init.d(并使用update-rc.d进行pipe理)中的内容是调用指定二进制文件的专门格式化的shell脚本。 只要把这个二进制文件连接到/etc/init.d就不会做任何有用的事情。
你是如何安装incron的? 我不运行Debian,但用于incron的Ubuntu(Lucid)包包含/etc/init.d/incron ,这是服务的正确初始化脚本。 是的,您可以使用/etc/init.d/skeleton作为起点,但实际上应该已经有一个init脚本在您的包中。
dpkg -L incron说什么?
debian incron软件包已经提供了一个/etc/init.d/incron脚本,默认情况下应该启用它。 你通常只需要安装包并运行它。
现在你已经修改了这个文件,因为它是一个conffile,所以包pipe理器不会用你的版本replace你的版本。 我build议删除你的/etc/init.d/incron脚本然后运行
apt-get -o DPkg::Options::='--force-confmiss' reinstall incron
强制包pipe理器replace丢失的conffile。