Welcome to mirror list, hosted at ThFree Co, Russian Federation.

hook.py « assets « certbot_integration_tests « certbot-ci - github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 39aa72ac5881db9cd880600f78dcabcd1d4e3c2a (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
import os
import sys

hook_script_type = os.path.basename(os.path.dirname(sys.argv[1]))
if hook_script_type == 'deploy' and ('RENEWED_DOMAINS' not in os.environ or 'RENEWED_LINEAGE' not in os.environ):
    sys.stderr.write('Environment variables not properly set!\n')
    sys.exit(1)

with open(sys.argv[2], 'a') as file_h:
    file_h.write(hook_script_type + '\n')