Skip to content

Commit

Permalink
mirahezerenewssl: fix output for command (#3667)
Browse files Browse the repository at this point in the history
  • Loading branch information
paladox authored Jan 19, 2024
1 parent 216809c commit 81302ab
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/ssl/files/mirahezerenewssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ def post():
lock.acquire()
try:
logger.info(f'Renewed SSL certificate: {content["SERVICEDESC"]}')
logger.info(subprocess.run(f'/var/lib/nagios/ssl-acme -s {content["SERVICESTATE"]} -t {content["SERVICESTATETYPE"]} -u {content["SERVICEDESC"]}', stderr=subprocess.STDOUT, shell=True))
command = subprocess.run(
f'/var/lib/nagios/ssl-acme -s {content["SERVICESTATE"]} -t {content["SERVICESTATETYPE"]} -u {content["SERVICEDESC"]}',
capture_output=True,
text=True,
shell=True)
if command.stdout:
logger.info(command.stdout)
if command.stderr:
logger.info(command.stderr)
lock_acquired = True
finally:
lock.release()
Expand Down

0 comments on commit 81302ab

Please sign in to comment.