From aadca0ad44986bce7287d80c2a5e88eb58f89e37 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Tue, 4 Oct 2022 13:42:21 -0400 Subject: [PATCH] Allow some arguments when running as server --- bin/sshyp.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/sshyp.py b/bin/sshyp.py index 59be966..c53a8c1 100755 --- a/bin/sshyp.py +++ b/bin/sshyp.py @@ -683,8 +683,10 @@ if __name__ == "__main__": ssh_error = int(open(path.expanduser('~/.config/sshyp/ssh-error')).read().strip()) if ssh_error != 0: ssh_error = copy_name_check(port, username_ssh, ip, client_device_name) - else: - print('running as server, option disabled') + elif argument_list[1] != "help" and argument_list[1] != "--help" and argument_list[1] != "-h" and \ + argument_list[1] != "license" and argument_list[1] != "version" and argument_list[1] != "-v": + print(f"\n\u001b[38;5;9merror: invalid server argument - run 'sshyp help' to " + f"list usable commands\u001b[0m\n") s_exit(0) except (FileNotFoundError, IndexError): if device_type.lower() != 's':