如果我从命令行执行它,我有一个可以正常工作的命令......但是当我把它放在一个 init.d 脚本中时它不会启动(好吧..它启动但具有与运行时不同的行为直接地)。
知道为什么这不适用于 init 脚本吗?
命令是: bluepill load /var/www/html/bluepill.conf
init.d 脚本是:
#!/bin/sh
## Based on http://www.novell.com/coolsolutions/feature/15380.html
# chkconfig: 345 99 1
# processname: solr
# Provides: bluepill
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: bluepill daemon, providing process monitoring
# Description: Bluepill
# Check for missing binaries
BLUEPILL_BIN=/usr/local/bin/bluepill
test -x $BLUEPILL_BIN || { echo "$BLUEPILL_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# Check …
Run Code Online (Sandbox Code Playgroud)