From d07c61cf1e3af6c7ad6064b26bbdea673d1d667c Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 6 Dec 2018 18:39:18 +0100 Subject: [PATCH] Make password prompt automatic --- check_syncrepl_extended | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_syncrepl_extended b/check_syncrepl_extended index 7833ec0..d7b4bac 100755 --- a/check_syncrepl_extended +++ b/check_syncrepl_extended @@ -82,7 +82,8 @@ parser.add_option( "-P", "--pwd", dest="pwd", action="store", type='string', - help="LDAP bind password. Specify '-P -' to ask for a prompt.") + help="LDAP bind password", + default=None) parser.add_option( "-b", "--basedn", dest="basedn", @@ -177,7 +178,7 @@ if options.touch and not options.attrs: logging.info('Force option attrs on touch mode') options.attrs=True -if options.pwd == '-': +if options.dn and options.pwd is None: options.pwd=getpass.getpass() excl_attrs=[]