Missing Cork file creation.

This commit is contained in:
Louis Vézina 2019-09-13 16:30:18 -04:00
parent 4e7e3a39d2
commit 5fcad77383
1 changed files with 17 additions and 0 deletions

View File

@ -68,6 +68,23 @@ config_file = os.path.normpath(os.path.join(args.config_dir, 'config', 'config.i
cfg = ConfigParser()
if not os.path.exists(os.path.normpath(os.path.join(args.config_dir, 'config', 'users.json'))):
cork = Cork(os.path.normpath(os.path.join(args.config_dir, 'config')), initialize=True)
cork._store.roles[''] = 100
cork._store.save_roles()
tstamp = str(time.time())
username = password = ''
cork._store.users[username] = {
'role': '',
'hash': cork._hash(username, password),
'email_addr': username,
'desc': username,
'creation_date': tstamp
}
cork._store.save_users()
def init_binaries():
exe = get_binary("unrar")