Convert the setup of ssl from a shell script to a
python module. This is in preparation for user supplied certs.
This commit is contained in:
1 parent
ad3fcc200c
commit
3b4f0db73e
7 files changed
+245
-229
No files matched your search
@@ -27,6 +27,7 @@ from random import Random
|
||||
from time import gmtime
|
||||
import os, sys, traceback, readline
|
||||
import stat
|
||||
import shutil
|
||||
|
||||
from types import *
|
||||
|
||||
@@ -101,6 +102,15 @@ def dir_exists(filename):
|
||||
except:
|
||||
return False
|
||||
|
||||
def install_file(fname, dest):
|
||||
if file_exists(dest):
|
||||
os.rename(dest, dest + ".orig")
|
||||
shutil.move(fname, dest)
|
||||
|
||||
def backup_file(fname):
|
||||
if file_exists(fname):
|
||||
os.rename(fname, fname + ".orig")
|
||||
|
||||
class CIDict(dict):
|
||||
"""
|
||||
Case-insensitive but case-respecting dictionary.
|
||||
|
||||
Reference in new issue
Block a user