mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-13 17:19:29 +00:00
Adapt to RHEL or Debian openssl config locations
This commit is contained in:
parent
8897842fc4
commit
4dab5fc527
@ -1,11 +1,16 @@
|
||||
from os.path import exists
|
||||
import shutil
|
||||
import socket
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
def get_openssl_conf_location():
|
||||
# CentOS/RHAT
|
||||
return '/etc/pki/tls/openssl.cnf'
|
||||
if exists('/etc/pki/tls/openssl.cnf'):
|
||||
return '/etc/pki/tls/openssl.cnf'
|
||||
elif exists('/etc/ssl/openssl.cnf');
|
||||
return '/etc/ssl/openssl.cnf'
|
||||
else:
|
||||
raise Exception("Cannot find openssl config file")
|
||||
|
||||
def get_ip_addresses():
|
||||
lines = subprocess.check_output('ip addr'.split(' '))
|
||||
@ -47,4 +52,4 @@ def create_certificate():
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
create_certificate()
|
||||
create_certificate()
|
||||
|
Loading…
x
Reference in New Issue
Block a user