aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid/portal-gui/scripts')
-rw-r--r--rpkid/portal-gui/scripts/rpki-manage.in10
-rw-r--r--rpkid/portal-gui/scripts/rpki-manage.py13
2 files changed, 13 insertions, 10 deletions
diff --git a/rpkid/portal-gui/scripts/rpki-manage.in b/rpkid/portal-gui/scripts/rpki-manage.in
deleted file mode 100644
index 6b7eedd8..00000000
--- a/rpkid/portal-gui/scripts/rpki-manage.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-# django-admin seems to have problems creating the superuser account when
-# $LANG is unset
-if [ -z "$LANG" ]; then
- echo '$LANG is unset, default to en_US.UTF-8'
- export LANG=en_US.UTF-8
-fi
-export PYTHONPATH=@PYTHONPATH@${PYTHONPATH:+:}${PYTHONPATH} DJANGO_SETTINGS_MODULE=rpki.gui.default_settings
-@DJANGO_ADMIN@ $*
diff --git a/rpkid/portal-gui/scripts/rpki-manage.py b/rpkid/portal-gui/scripts/rpki-manage.py
new file mode 100644
index 00000000..7bf84709
--- /dev/null
+++ b/rpkid/portal-gui/scripts/rpki-manage.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+import os
+from django.core.management import execute_from_command_line
+
+# django-admin seems to have problems creating the superuser account when
+# $LANG is unset
+if not 'LANG' in os.environ:
+ os.environ['LANG'] = 'en_US.UTF-8'
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'rpki.gui.default_settings'
+
+execute_from_command_line()