Add logging support.
This commit is contained in:
parent
b7ee4009e4
commit
7a3a9f500f
3
debian/dump1090-mr.default
vendored
3
debian/dump1090-mr.default
vendored
|
@ -7,6 +7,9 @@ START_DUMP1090="no"
|
||||||
# User to run dump1090 as.
|
# User to run dump1090 as.
|
||||||
DUMP1090_USER="dump1090"
|
DUMP1090_USER="dump1090"
|
||||||
|
|
||||||
|
# Logfile to log to
|
||||||
|
#LOGFILE="/var/log/dump1090-mr.log"
|
||||||
|
|
||||||
#
|
#
|
||||||
# The following options are all optional - defaults if not provided are
|
# The following options are all optional - defaults if not provided are
|
||||||
# shown below.
|
# shown below.
|
||||||
|
|
5
debian/dump1090-mr.init
vendored
5
debian/dump1090-mr.init
vendored
|
@ -28,6 +28,7 @@ SCRIPTNAME=/etc/init.d/$NAME
|
||||||
# Set defaults:
|
# Set defaults:
|
||||||
START_DUMP1090=no
|
START_DUMP1090=no
|
||||||
DUMP1090_USER=dump1090
|
DUMP1090_USER=dump1090
|
||||||
|
LOGFILE=/var/log/$NAME.log
|
||||||
DEVICE=0
|
DEVICE=0
|
||||||
GAIN=max
|
GAIN=max
|
||||||
PPM=0
|
PPM=0
|
||||||
|
@ -113,8 +114,8 @@ do_start()
|
||||||
|
|
||||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|
||||||
|| return 1
|
|| return 1
|
||||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $DUMP1090_USER --make-pidfile --background --exec $DAEMON -- \
|
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $DUMP1090_USER --make-pidfile --background --no-close --exec $DAEMON -- \
|
||||||
$ARGS \
|
$ARGS >>$LOGFILE 2>&1 \
|
||||||
|| return 2
|
|| return 2
|
||||||
sleep 1
|
sleep 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue