Last change
on this file since 38056d7 was
05b1088,
checked in by Alvaro Neira Ayuso <alvaroneay@…>, 5 years ago
|
Include License header
|
-
Property mode set to
100644
|
File size:
756 bytes
|
Rev | Line | |
---|
[05b1088] | 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 |
|
---|
[29fe301] | 9 | from src.ogClient import *
|
---|
| 10 | from src.ogConfig import *
|
---|
[445497f] | 11 | from signal import signal, SIGPIPE, SIG_DFL
|
---|
[29fe301] | 12 |
|
---|
| 13 | def main():
|
---|
[445497f] | 14 | signal(SIGPIPE, SIG_DFL)
|
---|
[29fe301] | 15 | ogconfig = ogConfig()
|
---|
| 16 | if (not ogconfig.parserFile('cfg/ogagent.cfg')):
|
---|
[7548870] | 17 | print ('Error: Parsing configuration file')
|
---|
[29fe301] | 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()
|
---|
[9eabc7f] | 25 | client.run()
|
---|
[29fe301] | 26 |
|
---|
| 27 | if __name__ == "__main__":
|
---|
| 28 | main()
|
---|
Note: See
TracBrowser
for help on using the repository browser.