Skip to content

Commit

Permalink
cmd: passivereconworker ok
Browse files Browse the repository at this point in the history
  • Loading branch information
p-l- committed Nov 15, 2015
1 parent f41f99f commit fc50d19
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions ivre/tools/passivereconworker.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ def worker(progname, directory, sensor=None):

def main():
"""Parses the arguments and call worker()"""
# Set the signal handler
for s in [signal.SIGINT, signal.SIGTERM]:
signal.signal(s, shutdown)
signal.siginterrupt(s, False)
try:
import argparse
parser = argparse.ArgumentParser(description=__doc__)
Expand All @@ -170,8 +174,8 @@ def main():
)
parser.add_argument(
'--progname', metavar='PROG',
help='Program to run (defaults to passiverecon2db).',
default="passiverecon2db",
help='Program to run (defaults to ivre passiverecon2db).',
default="ivre passiverecon2db",
)
args = parser.parse_args()
if args.sensor is not None:
Expand All @@ -182,12 +186,3 @@ def main():
else:
sensor = None
worker(args.progname, args.directory, sensor=sensor)


if __name__ == '__main__':
# Set the signal handler
for s in [signal.SIGINT, signal.SIGTERM]:
signal.signal(s, shutdown)
signal.siginterrupt(s, False)
# Start
main()

0 comments on commit fc50d19

Please sign in to comment.