Read configuration file from ARGV[0] if present

This commit is contained in:
Timothée Floure 2019-10-30 13:25:16 +01:00
parent 6d4f395a0f
commit 187ab67a84

View file

@ -142,7 +142,8 @@ end
def main def main
# Parse configuration, bind to LDAP server # Parse configuration, bind to LDAP server
@configuration = read_configuration(@configuration_file) configuration_file = ARGV[0] ? ARGV[0] : @configuration_file
@configuration = read_configuration(configuration_file)
conn = connect_ldap conn = connect_ldap
domain = @configuration['domain'] domain = @configuration['domain']