Browse Source

absolute path for configuration

lazouz/latoilescoute-snmp
Hugo Levy-Falk 7 years ago
committed by root
parent
commit
100942fb90
  1. 5
      mac_ip.py

5
mac_ip.py

@ -19,6 +19,7 @@
Creates the nat set.
"""
import os
import logging
from configparser import ConfigParser
@ -26,8 +27,10 @@ from re2oapi import Re2oAPIClient
from firewall import NetfilterSet
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
CONFIG = ConfigParser()
CONFIG.read('/usr/local/firewall/config.ini')
CONFIG.read(os.path.join(BASE_DIR, 'config.ini'))
api_hostname = CONFIG.get('Re2o', 'hostname')
api_password = CONFIG.get('Re2o', 'password')

Loading…
Cancel
Save