diff --git a/aprsd.py b/aprsd.py index 348d4d2..a77d6ca 100644 --- a/aprsd.py +++ b/aprsd.py @@ -70,14 +70,42 @@ parser.add_argument("--user", help="The callsign of this ARPS client with SSID" " Default=env[APRS_USER]") +parser.add_argument("--host", + metavar="", + default=utils.env("APRS_HOST"), + help="The aprs host to use Default=env[APRS_HOST]") +parser.add_argument("--password", + metavar="", + default=utils.env("APRS_PASSWORD"), + help="The aprs password Default=env[APRS_PASSWORD]") +parser.add_argument("--callsign", + metavar="", + default=utils.env("APRS_CALLSIGN"), + help="The callsign of radio in the field to which we send " + "email Default=env[APRS_CALLSIGN]") + args = parser.parse_args() if not args.user: - print("Missing the aprs user") + print("Missing the aprs user (env[APRS_USER])") parser.print_help() parser.exit() else: USER = args.user +if not args.password: + print("Missing the aprs password (env[APRS_PASSWORD])") + parser.print_help() + parser.exit() +else: + PASS = args.password + +if not args.callsign: + print("Missing the aprs callsign (env[APRS_CALLSIGN])") + parser.print_help() + parser.exit() +else: + BASECALLSIGN = args.callsign + try: tn = telnetlib.Telnet(HOST, 14580)