From 1896b51f82a73f15bb6af29ffb73f7ae8e54747c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 26 Jun 2020 12:40:07 -0400 Subject: [PATCH] Add emphasis to the HTTPS cert This is a particularly significant step that warrants highlighting. --- confluent_server/bin/osdeploy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/confluent_server/bin/osdeploy b/confluent_server/bin/osdeploy index 478cff41..eaf10750 100644 --- a/confluent_server/bin/osdeploy +++ b/confluent_server/bin/osdeploy @@ -22,6 +22,12 @@ try: except NameError: pass +def emprint(txt): + if sys.stdout.isatty(): + print('\x1b[1m\x1b[4m' + txt + '\x1b[0m') + else: + print(txt) + fnamechars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.^' def main(args): ap = argparse.ArgumentParser(description='Manage OS deployment resources') @@ -100,7 +106,7 @@ def initialize(cmdset): if cmdset.t: didsomething = True certutil.create_certificate() - print('New HTTPS certificates generated, restart the web server') + emprint('New HTTPS certificates generated, restart the web server') if cmdset.s: didsomething = True sshutil.initialize_ca()