kopia lustrzana https://github.com/cyoung/stratux
start/stop gen_gdl90 directly fron init.d-stratux
rodzic
3c7d700cff
commit
4d85491f67
|
@ -3,6 +3,7 @@ dump978/uat2esnt
|
|||
dump978/uat2json
|
||||
dump978/uat2text
|
||||
gen_gdl90
|
||||
libdump978.so
|
||||
|
||||
*.mp4
|
||||
|
||||
|
|
4
Makefile
4
Makefile
|
@ -66,11 +66,7 @@ www:
|
|||
install:
|
||||
cp -f gen_gdl90 /usr/bin/gen_gdl90
|
||||
chmod 755 /usr/bin/gen_gdl90
|
||||
cp start_uat.sh /usr/bin/start_uat
|
||||
cp init.d-stratux /etc/init.d/stratux
|
||||
cp start_stratux.sh /usr/sbin/stratux
|
||||
chmod 755 /usr/bin/start_uat
|
||||
chmod 755 /usr/sbin/stratux
|
||||
chmod 755 /etc/init.d/stratux
|
||||
ln -sf /etc/init.d/stratux /etc/rc2.d/S01stratux
|
||||
ln -sf /etc/init.d/stratux /etc/rc6.d/K01stratux
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON_SBIN=/usr/sbin/stratux
|
||||
DAEMON_SBIN=/usr/bin/gen_gdl90
|
||||
DAEMON_DEFS=
|
||||
DAEMON_CONF=
|
||||
NAME=stratux
|
||||
|
@ -22,14 +22,14 @@ PIDFILE=/var/run/stratux.pid
|
|||
|
||||
[ -x "$DAEMON_SBIN" ] || exit 0
|
||||
|
||||
DAEMON_OPTS="-B -P $PIDFILE $DAEMON_OPTS $DAEMON_CONF"
|
||||
DAEMON_OPTS=""
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_daemon_msg "Starting $DESC" "$NAME"
|
||||
start-stop-daemon --start --oknodo --quiet --exec "$DAEMON_SBIN" \
|
||||
start-stop-daemon --start --background --oknodo --quiet --exec "$DAEMON_SBIN" \
|
||||
--pidfile "$PIDFILE" --make-pidfile -- $DAEMON_OPTS >/dev/null
|
||||
log_end_msg "$?"
|
||||
;;
|
||||
|
@ -37,6 +37,7 @@ case "$1" in
|
|||
log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
start-stop-daemon --stop --oknodo --quiet --exec "$DAEMON_SBIN" \
|
||||
--pidfile "$PIDFILE"
|
||||
pkill dump1090 || true
|
||||
log_end_msg "$?"
|
||||
;;
|
||||
reload)
|
||||
|
|
|
@ -1196,6 +1196,7 @@ func main() {
|
|||
develFlag := flag.Bool("developer", false, "Developer mode")
|
||||
replayFlag := flag.Bool("replay", false, "Replay file flag")
|
||||
replaySpeed := flag.Int("speed", 1, "Replay speed multiplier")
|
||||
stdinFlag := flag.Bool("uatin", false, "Process UAT messages piped to stdin")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
|
@ -1312,7 +1313,7 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
} else if *stdinFlag == true {
|
||||
for {
|
||||
buf, err := reader.ReadString('\n')
|
||||
if err != nil {
|
||||
|
@ -1324,5 +1325,8 @@ func main() {
|
|||
relayMessage(msgtype, o)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// wait indefinitely
|
||||
select {}
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue