Last change
on this file since fdd4ba5 was
05b1088,
checked in by Alvaro Neira Ayuso <alvaroneay@…>, 5 years ago
|
Include License header
|
-
Property mode set to
100644
|
File size:
756 bytes
|
Line | |
---|
1 | #
|
---|
2 | # Copyright (C) 2020 Soleta Networks <info@soleta.eu>
|
---|
3 | #
|
---|
4 | # This program is free software: you can redistribute it and/or modify it under
|
---|
5 | # the terms of the GNU Affero General Public License as published by the
|
---|
6 | # Free Software Foundation, version 3.
|
---|
7 | #
|
---|
8 |
|
---|
9 | from src.ogClient import *
|
---|
10 | from src.ogConfig import *
|
---|
11 | from signal import signal, SIGPIPE, SIG_DFL
|
---|
12 |
|
---|
13 | def main():
|
---|
14 | signal(SIGPIPE, SIG_DFL)
|
---|
15 | ogconfig = ogConfig()
|
---|
16 | if (not ogconfig.parserFile('cfg/ogagent.cfg')):
|
---|
17 | print ('Error: Parsing configuration file')
|
---|
18 | return 0
|
---|
19 |
|
---|
20 | ip = ogconfig.getValueSection('opengnsys', 'ip')
|
---|
21 | port = ogconfig.getValueSection('opengnsys', 'port')
|
---|
22 |
|
---|
23 | client = ogClient(ip, int(port))
|
---|
24 | client.connect()
|
---|
25 | client.run()
|
---|
26 |
|
---|
27 | if __name__ == "__main__":
|
---|
28 | main()
|
---|
Note: See
TracBrowser
for help on using the repository browser.