-
Notifications
You must be signed in to change notification settings - Fork 832
/
ajenti-test-instance.py
52 lines (43 loc) · 1021 Bytes
/
ajenti-test-instance.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import logging
import sys
import os
sys.path.insert(0, '../ajenti-core')
import aj
import aj.config
import aj.entry
import aj.log
import aj.plugins
class TestConfig(aj.config.BaseConfig):
def __init__(self):
aj.config.BaseConfig.__init__(self)
self.data = {
'bind': {
'mode': 'tcp',
'host': '0.0.0.0',
'port': 8000,
},
'color': 'blue',
'name': 'test',
'ssl': {
'enable': False
},
'email': {
'enable': False
},
}
def load(self):
pass
def save(self):
pass
aj.log.init_console(logging.WARN)
# Ensure tree for secret key
os.makedirs('/etc/ajenti', exist_ok=True)
aj.entry.start(
config=TestConfig(),
dev_mode=False,
debug_mode=True,
autologin=True,
product_name='ajenti',
daemonize=False,
plugin_providers=[aj.plugins.DirectoryPluginProvider('../plugins')],
)