From ca888685c56757657edf499bea57cfe9b36a5217 Mon Sep 17 00:00:00 2001 From: "Walter A. Boring IV" Date: Wed, 21 Nov 2018 13:03:28 -0800 Subject: [PATCH] Added password, callsign and host This patch adds the cli options for setting the host, password and the base callsign --- aprsd.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) 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)