Send STDOUT and STDERR to the appropriate files

This commit is contained in:
Ben Heilman 2013-11-21 20:22:51 -06:00
Родитель c2cc368753
Коммит dbc8148d6e
1 изменённых файлов: 3 добавлений и 3 удалений

6
debian/statsd.init поставляемый
Просмотреть файл

@ -23,7 +23,7 @@ DESC="StatsD"
NAME=statsd
USER=_statsd
DAEMON=$NODE_BIN
DAEMON_ARGS="/usr/share/statsd/stats.js /etc/statsd/localConfig.js 2>&1 >> /var/log/statsd/statsd.log "
DAEMON_ARGS="/usr/share/statsd/stats.js /etc/statsd/localConfig.js"
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CHDIR="/usr/share/statsd"
@ -59,8 +59,8 @@ do_start()
# 2 if daemon could not be started
start-stop-daemon --start --quiet -m --pidfile $PIDFILE --startas $DAEMON --chuid $USER:$USER --background --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet -m --pidfile $PIDFILE --startas $DAEMON --chuid $USER:$USER --background --chdir $CHDIR -- \
$DAEMON_ARGS > /dev/null 2> /var/log/$NAME-stderr.log \
start-stop-daemon --start --quiet -m --pidfile $PIDFILE --startas $DAEMON --chuid $USER:$USER --background --no-close --chdir $CHDIR -- \
$DAEMON_ARGS >> /var/log/statsd/statsd.log 2> /var/log/$NAME-stderr.log \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend