summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/main.py b/main.py
index a67362d..e6cacf5 100755
--- a/main.py
+++ b/main.py
@@ -25,8 +25,17 @@ def main():
port = ogconfig.get_value_section('opengnsys', 'port')
url = ogconfig.get_value_section('opengnsys', 'url')
mode = ogconfig.get_value_section('opengnsys', 'mode')
+ samba_user = ogconfig.get_value_section('samba', 'user')
+ samba_pass = ogconfig.get_value_section('samba', 'pass')
- client = ogClient(ip, int(port), mode)
+ samba_config = None
+
+ if mode == 'linux':
+ proc = subprocess.Popen(["browser", "-qws", url])
+ elif mode == 'virtual':
+ samba_config = {'user': samba_user, 'pass': samba_pass}
+
+ client = ogClient(ip, int(port), mode, samba_config)
client.connect()
client.run()