JuMonitor/juconfigen.py
2019-11-01 12:32:43 +01:00

30 lines
723 B
Python

import configparser
config=configparser.ConfigParser()
#Sections
config['DEFAULT']={}
config['Clients']={'CloudFlare' : '1.1.1.1'}
config['Alerts']=\
{'log_send_interval' : '0',\
'send_alerts' : 'False'}
config['Mailinfo']=\
{'server_address' : 'smtp.gmail.com',\
'server_port' : '587',\
'server_username' : 'jupythontest@gmail.com',\
'server_password' : 'Rataflup2503',\
'server_recipient' : 'justinepelletreau@gmail.com'}
config['Intervals']=\
{'interval': '5',\
'interval_dead_clients' : '5'}
#print({section: dict(config[section]) for section in config.sections()})
for section in config.sections():
print(dict(config[section]))
#with open('jumonitor.conf', 'w') as configfile:
# config.write(configfile)