diff options
Diffstat (limited to 'rpkid/portal-gui/scripts/rpkigui-sync-users.py')
-rw-r--r-- | rpkid/portal-gui/scripts/rpkigui-sync-users.py | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/rpkid/portal-gui/scripts/rpkigui-sync-users.py b/rpkid/portal-gui/scripts/rpkigui-sync-users.py index 0f15c65d..9c636e95 100644 --- a/rpkid/portal-gui/scripts/rpkigui-sync-users.py +++ b/rpkid/portal-gui/scripts/rpkigui-sync-users.py @@ -1,18 +1,24 @@ +# Copyright (C) 2013 SPARTA, Inc. a Parsons Company +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND SPARTA DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL SPARTA BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +__version__ = '$Id$' + """ Ensure that a web login exists for labuser* resource holder """ - -import os -import sys - -# if the environment is not already set up, look in the default places -if not os.getenv("DJANGO_SETTINGS_MODULE"): - os.environ["DJANGO_SETTINGS_MODULE"] = 'settings' - for d in ('/etc/rpki', '/usr/local/etc/rpki'): - if os.path.exists(os.path.join(d, 'settings.py')): - print 'found settings.py in ' + d - sys.path.insert(1, d) - break +from rpki.gui.script_util import setup +setup() from django.contrib.auth.models import User from rpki.gui.app.models import Conf, ConfACL |