Add logging support.

This commit is contained in:
Oliver Jowett 2014-12-06 16:06:39 +00:00
parent b7ee4009e4
commit 7a3a9f500f
2 changed files with 6 additions and 2 deletions

View file

@ -7,6 +7,9 @@ START_DUMP1090="no"
# User to run dump1090 as.
DUMP1090_USER="dump1090"
# Logfile to log to
#LOGFILE="/var/log/dump1090-mr.log"
#
# The following options are all optional - defaults if not provided are
# shown below.

View file

@ -28,6 +28,7 @@ SCRIPTNAME=/etc/init.d/$NAME
# Set defaults:
START_DUMP1090=no
DUMP1090_USER=dump1090
LOGFILE=/var/log/$NAME.log
DEVICE=0
GAIN=max
PPM=0
@ -113,8 +114,8 @@ do_start()
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $DUMP1090_USER --make-pidfile --background --exec $DAEMON -- \
$ARGS \
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $DUMP1090_USER --make-pidfile --background --no-close --exec $DAEMON -- \
$ARGS >>$LOGFILE 2>&1 \
|| return 2
sleep 1
}