mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Django secret generated per install,
This commit is contained in:
10
installer
10
installer
@@ -1,12 +1,9 @@
|
||||
#!/usr/bin/ env python
|
||||
#!/usr/bin/ env python3
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import platform
|
||||
import pprint
|
||||
import subprocess as sp
|
||||
import sys
|
||||
from shutil import copyfile
|
||||
from django.core.management.utils import get_random_secret_key
|
||||
|
||||
import psutil
|
||||
from src.backend.lib.display import TerminalDisplay
|
||||
@@ -34,6 +31,8 @@ class Configuration:
|
||||
json.dump(data, backup_file)
|
||||
return data
|
||||
except Exception as e:
|
||||
f = open(str(self._cp),"w")
|
||||
f
|
||||
print(e)
|
||||
return False
|
||||
|
||||
@@ -225,6 +224,7 @@ for key in install_answers:
|
||||
config[key["name"]] = key["answer"]
|
||||
# config["USER"] = os.environ["USER"]
|
||||
config["USER"] = "pyshelf"
|
||||
config["SECRET"] = get_random_secret_key()
|
||||
# Write configuration
|
||||
Configuration().write_file(config)
|
||||
# Start checking for our list of required services
|
||||
|
||||
Reference in New Issue
Block a user