Changeset 2813
- Timestamp:
- Dec 16, 2016, 1:18:57 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/fedora/config/etc/httpd/export-scripts-certs
r2811 r2813 26 26 27 27 cert_filenames = set() 28 error = False 28 29 29 30 def conf(vhost): … … 42 43 os.rename(cert_path + '.new', cert_path) 43 44 45 key_path = os.path.join('/etc/pki/tls/private', key_filename) 46 if not os.path.exists(key_path): 47 sys.stderr.write("Error: key file {} does not exist for vhost {}\n".format(key_path, name)) 48 global error 49 error = True 50 return 51 44 52 for port in 443, 444: 45 53 yield '<VirtualHost *:{}>\n'.format(port) … … 52 60 yield '\tInclude conf.d/vhosts-common-ssl-cert.conf\n' 53 61 yield '\tSSLCertificateFile {}\n'.format(cert_path) 54 yield '\tSSLCertificateKeyFile {}\n'.format( os.path.join('/etc/pki/tls/private', key_filename))62 yield '\tSSLCertificateKeyFile {}\n'.format(key_path) 55 63 yield '</VirtualHost>\n' 56 64 … … 63 71 if filename.endswith('.pem') and filename not in cert_filenames: 64 72 os.remove(os.path.join(CERTS_DIR, filename)) 73 74 sys.exit(1 if error else 0)
Note: See TracChangeset
for help on using the changeset viewer.