2
我正在使用Debian风格的linux系统。我正在使用瘦Web服务器在我的应用程序中获取呼叫的实时状态。当我使用/etc/init.d/thin start时,这个过程就开始了。我使用了update-rc.d -f thin默认设置,以便在系统引导时启动精简进程。在添加条目之后,我重新启动了系统,但精简进程没有启动。我检查了apache2,它在系统启动时正常启动。我在init.d中的瘦脚本如下,如何在系统启动时启动精简过程
DAEMON=/usr/local/lib/ruby/gems/1.9.1/bin/thin
SCRIPT_NAME=/etc/init.d/thin
CONFIG_PATH=/etc/thin
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
case "$1" in
start)
$DAEMON start --all $CONFIG_PATH
;;
stop)
$DAEMON stop --all $CONFIG_PATH
;;
restart)
$DAEMON restart --all $CONFIG_PATH
;;
*)
echo "Usage: $SCRIPT_NAME {start|stop|restart}" >&2
exit 3
;;
esac
我在/ etc/thin中的配置文件如下。
user_status.yml
---
chdir: /FMS/src/FMS-Frontend
environment: production
address: localhost
port: 5000
timeout: 30
log: log/thin.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 1
rackup: user_status.ru
threaded: true
daemonize: false
这不是http://askubuntu.com或http://unix.stackexchange.com的问题吗? – nathanvda
您是否将脚本改为755? – valk