2
2
"""
3
3
Utility for managing containers system
4
4
that gives access to yggdrasil network and alfis dns
5
- via firefox browser in your host browser
5
+ via firefox browser
6
6
"""
7
7
8
8
import os
9
- import re
10
9
import sys
11
10
import shutil
12
11
import argparse
@@ -18,9 +17,14 @@ def start():
18
17
Initializes yggway subsystems and starts system
19
18
"""
20
19
21
- xdpy_info = subprocess .run (["xdpyinfo" ], stdout = subprocess .PIPE , check = True , text = True )
22
- resolution = re .search (r"dimensions: ([0-9]+)x([0-9]+) pixels" , xdpy_info .stdout )
23
- (os .environ ["DISPLAY_WIDTH" ], os .environ ["DISPLAY_HEIGHT" ]) = resolution .groups ()
20
+ os .environ ["PUID" ] = subprocess .run (
21
+ ["id" , "-u" ], stdout = subprocess .PIPE , check = True , text = True ).stdout
22
+
23
+ os .environ ["PGID" ] = subprocess .run (
24
+ ["id" , "-g" ], stdout = subprocess .PIPE , check = True , text = True ).stdout
25
+
26
+ os .environ ["TZ" ] = subprocess .run (
27
+ ["cat" , "/etc/timezone" ], stdout = subprocess .PIPE , check = True , text = True ).stdout
24
28
25
29
subprocess .run (["docker-compose" , "config" ], stdout = subprocess .DEVNULL , check = True )
26
30
@@ -32,6 +36,7 @@ def start():
32
36
shutil .copy ("config/blockchain.db" , "storage/alfis" )
33
37
shutil .copy ("config/peers.json" , "storage/yggdrasil" )
34
38
39
+ subprocess .run (["xhost" , "+" ], check = True )
35
40
subprocess .run (["docker-compose" , "up" , "--detach" ], check = True )
36
41
37
42
@@ -81,7 +86,7 @@ def parse_args():
81
86
82
87
parser .add_argument (
83
88
'-u' , '--start' , action = 'store_true' ,
84
- help = 'starts yggdrasil gateway; (you could access to browser through localhost:5800 )'
89
+ help = 'starts yggdrasil gateway(Mozilla window will open instantly )'
85
90
)
86
91
87
92
parser .add_argument (
0 commit comments