diff --git a/bin/py-i2phosts-builder b/bin/py-i2phosts-builder index d4810b2..11250cb 100755 --- a/bin/py-i2phosts-builder +++ b/bin/py-i2phosts-builder @@ -35,6 +35,8 @@ else: DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/..' sys.path.insert(1, DJANGO_PROJECT_PATH) os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE +import django +django.setup() from pyi2phosts.postkey.models import i2phost from pyi2phosts.lib.utils import validate_config diff --git a/bin/py-i2phosts-checker b/bin/py-i2phosts-checker index f4c494f..d694160 100755 --- a/bin/py-i2phosts-checker +++ b/bin/py-i2phosts-checker @@ -40,6 +40,8 @@ else: DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/..' sys.path.insert(1, DJANGO_PROJECT_PATH) os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE +import django +django.setup() from pyi2phosts.postkey.models import i2phost from pyi2phosts.lib.utils import get_logger from pyi2phosts.lib.utils import validate_config diff --git a/bin/py-i2phosts-fetcher b/bin/py-i2phosts-fetcher index ab05816..911be0a 100755 --- a/bin/py-i2phosts-fetcher +++ b/bin/py-i2phosts-fetcher @@ -43,6 +43,8 @@ else: DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/..' sys.path.insert(1, DJANGO_PROJECT_PATH) os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE +import django +django.setup() from pyi2phosts.lib.utils import get_logger from pyi2phosts.lib.utils import validate_config from pyi2phosts.extsources.models import ExternalSource diff --git a/bin/py-i2phosts-injector b/bin/py-i2phosts-injector index a167f30..4eed2c2 100755 --- a/bin/py-i2phosts-injector +++ b/bin/py-i2phosts-injector @@ -40,6 +40,8 @@ else: DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/..' sys.path.insert(1, DJANGO_PROJECT_PATH) os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE +import django +django.setup() from pyi2phosts.postkey.models import i2phost from pyi2phosts.lib.validation import validate_hostname from pyi2phosts.lib.validation import validate_b64hash diff --git a/bin/py-i2phosts-maint b/bin/py-i2phosts-maint index 95693f2..e98c030 100755 --- a/bin/py-i2phosts-maint +++ b/bin/py-i2phosts-maint @@ -43,6 +43,8 @@ else: DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/..' sys.path.insert(1, DJANGO_PROJECT_PATH) os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE +import django +django.setup() from pyi2phosts.postkey.models import i2phost from pyi2phosts.lib.utils import get_logger from pyi2phosts.lib.utils import validate_config diff --git a/bin/py-i2phosts-master b/bin/py-i2phosts-master index 926b65c..a9d42be 100755 --- a/bin/py-i2phosts-master +++ b/bin/py-i2phosts-master @@ -128,6 +128,8 @@ else: DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/..' sys.path.insert(1, DJANGO_PROJECT_PATH) os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE +import django +django.setup() from pyi2phosts.lib.utils import get_logger from pyi2phosts.lib.utils import validate_config