9
我有以下启动 - 停止脚本:“启动 - 停止守护程序:无法STAT”
NAME="examplestartstop"
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
LOGFILE="/var/log/$NAME/start-stop-daemon.log"
APP_DIR="/usr/bin"
APP_BIN="tail -250f /var/log/apache2/error.log"
USER="minecraft"
GROUP="minecraft"
# Include functions
set -e
. /lib/lsb/init-functions
start() {
echo "Starting '$NAME'... "
start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec "$APP_DIR/$APP_BIN" $LOGFILE || true
echo "done"
}
当我尝试运行该脚本,我得到下面的输出:
$ ./test start
Starting 'examplestartstop'...
start-stop-daemon: unable to stat /usr/bin/tail -250f /var/log/apache2/error.log (No such file or directory)
done
我是怎么做错的$APP_DIR/$APP_BIN
一部分?
当我这样做我得到一个错误 启停-daemon:无法识别的选项 '--- 250F' – 2014-02-04 11:40:44
你错过'--'和'$ APP_ARGS'之间的空间?并请为您的问题开始一个新问题。 – scai 2014-02-04 11:49:11