Last change
on this file since 96090fd was
866b6c5,
checked in by OpenGnSys Support Team <soporte-og@…>, 4 years ago
|
#988 add json configuration file
New configuration file at /opt/opengnsys/cfg/ogserver.json
|
-
Property mode set to
100644
|
File size:
806 bytes
|
Rev | Line | |
---|
[866b6c5] | 1 | #ifndef _OG_SERVER_CFG_H |
---|
| 2 | #define _OG_SERVER_CFG_H |
---|
| 3 | |
---|
| 4 | struct og_server_cfg { |
---|
| 5 | struct { |
---|
| 6 | const char *user; |
---|
| 7 | const char *pass; |
---|
| 8 | const char *ip; |
---|
| 9 | const char *name; |
---|
| 10 | } db; |
---|
| 11 | struct { |
---|
| 12 | const char *ip; |
---|
| 13 | const char *port; |
---|
| 14 | const char *api_token; |
---|
| 15 | } rest; |
---|
| 16 | struct { |
---|
| 17 | const char *interface; |
---|
| 18 | } wol; |
---|
| 19 | }; |
---|
| 20 | |
---|
| 21 | int parse_json_config(const char *filename, struct og_server_cfg *cfg); |
---|
| 22 | |
---|
| 23 | extern char auth_token[4096]; |
---|
| 24 | extern char usuario[4096]; |
---|
| 25 | extern char pasguor[4096]; |
---|
| 26 | extern char catalog[4096]; |
---|
| 27 | extern char datasource[4096]; |
---|
| 28 | extern char interface[4096]; |
---|
| 29 | extern char api_token[4096]; |
---|
| 30 | |
---|
| 31 | void from_json_to_legacy(struct og_server_cfg *cfg); |
---|
| 32 | |
---|
| 33 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.