1
启动时init.d脚本的PATH问题
我有一个简单的脚本(在Ubuntu 12.04LTS上)启动独角兽实例。 #!/bin/sh case "$1" in start) echo "starting" cd /path && bundle exec unicorn -c /path/config/unicorn.rb -D -E production ;; stop) echo "Stopping Unicorn Instances" kill `cat /tmp/unicorn.pid` ;; restart) echo "sending USR2 to all unicorns" kill -s USR2 `cat /tmp/unicorn.pid` ;; esac exit 0 调用时,它的行为正确: /etc/init.d/unicorn_boot.sh start 我希望它在启动时启动,所以我跑了: …