diff --git a/debian/dump1090-mr.default b/debian/dump1090-mr.default index 8a96f0a..f5e40a8 100644 --- a/debian/dump1090-mr.default +++ b/debian/dump1090-mr.default @@ -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. diff --git a/debian/dump1090-mr.init b/debian/dump1090-mr.init index 514068f..cf03a31 100644 --- a/debian/dump1090-mr.init +++ b/debian/dump1090-mr.init @@ -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 }