Added support for add config from url for windows
This commit is contained in:
parent
b74ff75c43
commit
990b993e2e
1 changed files with 13 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ from sys import exit
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import signal
|
import signal
|
||||||
from socket import getfqdn
|
from socket import getfqdn
|
||||||
|
import argparse
|
||||||
|
|
||||||
#url="http://url/to/info"
|
#url="http://url/to/info"
|
||||||
|
|
||||||
|
|
@ -37,6 +38,18 @@ def load_config():
|
||||||
|
|
||||||
yes_config=True
|
yes_config=True
|
||||||
|
|
||||||
|
else:
|
||||||
|
#Check command line
|
||||||
|
parser = argparse.ArgumentParser(description='Script for send data to monitor server')
|
||||||
|
parser.add_argument('--config', help='Path from configuration file', required=True)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
file_config=args.config
|
||||||
|
|
||||||
|
config.read(file_config)
|
||||||
|
|
||||||
|
yes_config=True
|
||||||
|
|
||||||
if not yes_config:
|
if not yes_config:
|
||||||
|
|
||||||
exit("Sorry, cannot load config file")
|
exit("Sorry, cannot load config file")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue