|
|
@ -62,15 +62,17 @@ def update_namesilo_data(key, domain, rrid, subdomain, new_value): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
def main(): |
|
|
|
api_key = os.environ['NAMESILO_API'] |
|
|
|
|
|
|
|
if not api_key: |
|
|
|
|
|
|
|
print('NAMESILO_API in env is not found.') |
|
|
|
|
|
|
|
sys.exit() |
|
|
|
|
|
|
|
print('KEY: {}...'.format(api_key[:3])) |
|
|
|
|
|
|
|
config = configparser.ConfigParser() |
|
|
|
config = configparser.ConfigParser() |
|
|
|
config.read('settings.conf') |
|
|
|
config.read('settings.conf') |
|
|
|
domain = config['default']['domain'] |
|
|
|
domain = config['default']['domain'] |
|
|
|
subdomain = config['default']['subdomain'] |
|
|
|
subdomain = config['default']['subdomain'] |
|
|
|
|
|
|
|
api_key = os.environ.get('NAMESILO_API', None) |
|
|
|
|
|
|
|
if not api_key: |
|
|
|
|
|
|
|
if 'namesilo_api' not in config['default']: |
|
|
|
|
|
|
|
print('NAMESILO_API not found.') |
|
|
|
|
|
|
|
sys.exit() |
|
|
|
|
|
|
|
api_key = config['default']['namesilo_api'] |
|
|
|
|
|
|
|
print('KEY: {}...'.format(api_key[:3])) |
|
|
|
target = '{}.{}'.format(subdomain, domain) |
|
|
|
target = '{}.{}'.format(subdomain, domain) |
|
|
|
print('TARGET: {}'.format(target)) |
|
|
|
print('TARGET: {}'.format(target)) |
|
|
|
public_ip = get_public_ip() |
|
|
|
public_ip = get_public_ip() |
|
|
|