Skip to main content
Sign in
Snippets Groups Projects
Commit 9e15c34c authored by Jeremy Jarrell's avatar Jeremy Jarrell
Browse files

Adds the ability to parse users who should be whitelisted from the command line.

parent 5f8e01c4
No related branches found
No related tags found
No related merge requests found
......@@ -32,9 +32,16 @@ import chkcrontab_lib as check
def main(argv):
"""main program."""
if len(argv) != 2:
if len(argv) == 1:
print('ERROR: No crontab file was specified.')
sys.exit(1)
if len(argv) > 2:
for arg in argv:
if '--whitelist' in arg:
whitelist_users = arg['--whitelist='.__len__():].split(',')
log = check.LogCounter()
print('Checking correctness of %s' % argv[1])
return check.check_crontab(argv[1], log)
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment