split plc.d/ and db-config.d between myplc and plcapi modules as a first step
[myplc.git] / db-config.d / 001-admin_user
diff --git a/db-config.d/001-admin_user b/db-config.d/001-admin_user
deleted file mode 100644 (file)
index 8797164..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*-python-*-
-# $Id$
-# $URL$
-#################### 
-# Create/update the default administrator account (should be person_id 2).
-
-admin = { 'person_id': 2,
-          'first_name': "Default",
-          'last_name': "Administrator",
-          'email': plc['root_user'],
-          'password': plc['root_password'] }
-persons = GetPersons([admin['person_id']])
-if not persons:
-    person_id = AddPerson(admin)
-    if person_id != admin['person_id']:
-        # Huh? Someone deleted the account manually from the database.
-        DeletePerson(person_id)
-        raise Exception, "Someone deleted the \"%s %s\" account from the database!" % \
-              (admin['first_name'], admin['last_name'])
-    UpdatePerson(person_id, { 'enabled': True })
-else:
-    person_id = persons[0]['person_id']
-    UpdatePerson(person_id, admin)
-